Giter VIP home page Giter VIP logo

leanprover-community.github.io's Introduction

Lean prover community website

The deployed website lives on the master branch of this repository. To make changes to the website, please fork the repository and make a PR against the lean4 branch. Once your PR is merged, CI will automatically deploy the changes to the master branch.

Dependencies

  • pip install -r requirements.txt

Building the bibliography requires bibtool.

In order to rebuild the CSS from SCSS, you also need:

The website relies on several components which are built in other repositories:

Building

  • Build CSS if needed: sass scss/lean.scss > css/lean.css
  • Build site using make_site.py. Use option --local for local viewing (internal url will be prefixed by local file path). Use option --reload to continuously build when templates are changed (this won't work for watching changes in data/).

If you want to retrieve the list of Zulip users to get the users map, the environment variable ZULIP_KEY should be set with the Zulip API key of the map scraper bot.

If you want to work on a new feature, there are several helpful tricks to know.

First you will very quickly hit the GitHub API rate limit without authentication. You can create a personal access token and run GITHUB_TOKEN=my_token_copied_from_github ./make_site --local during your experiments.

You can also run the script once normally and then run NODOWNLOAD=1 ./make_site --local to build the website using the information previously downloaded. This information is stored into the data_cache folder. If you need the script to download something but not everything you can temporarily change the relevant if DOWNLOAD: into a if not DOWNLOAD:.

You can also choose to render only certain templates using ./make_site --local --only my_template.html. This argument can actually be a regular expression, but giving one template name is the most common use case.

TODO

  • Better integration with API docs
  • Use webpack or similar to bundle all the javascript?

Lean 3 website

The files and history for the leanprover-community Lean 3 website can be found in the lean3 branch of this repo.

Old website

The files and history for the old leanprover-community website can be found in the oldsite branch of this repo.

leanprover-community.github.io's People

Contributors

alexjbest avatar avigad avatar boltonbailey avatar bryangingechen avatar eric-wieser avatar faenuccio avatar fpvandoorn avatar gebner avatar hrmacbeth avatar j-loreaux avatar jalex-stark avatar jcommelin avatar jsm28 avatar julian avatar kbuzzard avatar madvorak avatar mattrobball avatar mcdoll avatar patrickmassot avatar paulvanwamelen avatar pitmonticone avatar raitobezarius avatar remydegenne avatar riccardobrasca avatar robertylewis avatar semorrison avatar sgouezel avatar twofx avatar urkud avatar vierkantor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

leanprover-community.github.io's Issues

Broken links in documentation (category_theory)

Prerequisites

  • [ X] Put an X between the brackets on this line if you have done all of the following:
    • Checked that your issue isn't already filed.
    • Reduced the issue to a self-contained, reproducible test case.

Description

Most of the hyperlinks on this page are broken: https://leanprover-community.github.io/theories/category_theory.html

Steps to Reproduce

  1. Just try them.

Expected behavior: [What you expect to happen]

Not 404.

Actual behavior: [What actually happens]

Reproduces how often: [What percentage of the time does it reproduce?]

Reliably

Versions

Version 3 community, online.

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

removed section on documenting tactics, needs to be updated and restored

I removed the following chunk from templates/contribute/doc.md. A replacement should eventually be restored...

## Tactic doc entries

Interactive tactics, user commands, hole commands and user attributes should have doc strings
explaining how they can be used. The `add_tactic_doc` command should be invoked afterwards to add a
doc entry to the appropriate page in the online docs.

Example:
```lean
/--
describe what the command does here
-/
add_tactic_doc
{ name := "display name of the tactic",
  category := cat,
  decl_names := [`dcl_1, `dcl_2],
  tags := ["tag_1", "tag_2"]
}

The argument to add_tactic_doc is a structure of type tactic_doc_entry.

  • name refers to the display name of the tactic; it is used as the header of the doc entry.
  • cat refers to the category of doc entry.
    Options: doc_category.tactic, doc_category.cmd, doc_category.hole_cmd, doc_category.attr
  • decl_names is a list of the declarations associated with this doc. For instance,
    the entry for linarith would set decl_names := [`tactic.interactive.linarith].
    Some entries may cover multiple declarations.
    It is only necessary to list the interactive versions of tactics.
  • tags is an optional list of strings used to categorize entries.
  • The doc string is the body of the entry. It can be formatted with markdown.
    What you are reading now is taken from the description of add_tactic_doc.

If only one related declaration is listed in decl_names and if this
invocation of add_tactic_doc does not have a doc string, the doc string of
that declaration will become the body of the tactic doc entry. If there are
multiple declarations, you can select the one to be used by passing a name to
the inherit_description_from field.

If you prefer a tactic to have a doc string that is different then the doc entry, then between
the /-- -/ markers, write the desired doc string first, then --- surrounded by new lines,
and then the doc entry.

Note that providing a badly formed tactic_doc_entry to the command can result in strange error
messages.

100 theorems links can be simplified

No time at the moment to do it myself, but just wanted to leave a public message that the 100 theorems links can be simplified. No need to store the directory, the random .html#, etc. Just the declaration name (e.g. complex.exists_root) will be enough. The generation can create links like

https://leanprover-community.github.io/mathlib_docs/find/complex.exists_root
https://leanprover-community.github.io/mathlib_docs/find/complex.exists_root/src

(Of course this only works for things in mathlib, but so does the current scheme, and this is more robust to refactorings.)

HTML `<title>`s

Right now, the <title>s of all the pages just say Lean community, which isn't brilliant when a user may have multiple pages open at the same time, or if they want to search for something, as they'll have to look at the URL to find what they want.

Also it might help when people are looking for things using a search engine? Although right now Google is the only search engine that even finds any of the install pages, and it's smart enough to pull in the <h1>.

It might make more sense to use the markdown titles for the HTML <title> tags.

I hope this paragraph about `leanpkg` and `leanproject` can be made easier to find

All this means you need a Lean project manager. Your download at the very beginning does include such a tool, at bin/leanpkg. That one is written in Lean (you can see all the code in lib/lean/leanpkg/), so you already have all the required dependencies. However Lean, at least in its current series Lean 3.X.X, is not convenient at all to build a powerful project manager. So the Lean user community has build a more powerful project manager written in python: leanproject.

https://leanprover-community.github.io/toolchain.html#handling-dependencies

Can we adopt your Zulip archive export tool?

Hey, I run the Zulip project, and I was wondering if you folks would be interested in helping migrate your data import tool to something that lives in https://github.com/zulip/python-zulip-api that we document as generally available to other projects that want a public archive?

If so, I'd love to have some of our core contributors collaborate with the author to integrate it there (and then you can just use our project as a pip dependency here).

We have plans for a more built-in experience in Zulip, but I was realizing even if we provide that, this sort of "generate HTML" thing is both more customizable and maybe a cleaner approach for a final public archive of a Zulip organization being closed down, so we probably want something of this form available as a tool to use with Zulip anyway.

Add a glossary entries for HoTT, UH, TC, fbip, dot notation and API

These terms and acronyms could be difficult for newcomers depending on their background:

  • HoTT: Homotopy Type Theory
  • UH: Unification Hints
  • TC: Type Classes
  • fbip: Functional But In Place
  • dot notation: field notation: generalized structure projection
  • API: Application Programming Interface

markdown to html conversion mangles `[name](url).`

The text For a faster paced and broader dive, you can get the [tutorials project](https://github.com/leanprover-community/tutorials). shows up in https://leanprover-community.github.io/learn.html but not https://github.com/leanprover-community/leanprover-community.github.io/blob/newsite/templates/learn.md and links to the non-existent page https://github.com/leanprover-community/tutorials). Links which are not immediately followed by . do not suffer this problem.

`source` in install/project

in https://leanprover-community.github.io/install/project.html, there is a line

  • If you have not logged in since you installed Lean and mathlib, then you may need to first type source ~/.profile or source ~/.bash_profile depending on your OS.

Someone just asked about this in the Xena Discord, about an error on Windows, which was bash: /c/Users/<their username>/.profile: No such file or directory. I told them to just close Git Bash and reopen it, which should do the same thing. Weirdly, if I do ls -a in Git Bash on my computer, I do see ~/.profile.

It might be worth mentioning explicitly what to do/expect on each OS, since right now it's expecting users to already be familiar with the command line. I would make a PR but it's been years since I last used Mac/Linux, and Windows behaviour seems to vary?

`{{` cannot be used in markdown files

We're telling staticjinja that every .md file is a jinja2 template, so if one of them contains {{ (e.g. when talking about "weakly implicit" arguments in Lean, (usually written in unicode)), jinja2 will be unable to parse the file and then complain:

jinja2.exceptions.TemplateSyntaxError: unexpected char 'XX' at YY

This came up when testing templates/latex.md in #165.

links inside declarations on 100 theorems page are broken

At https://leanprover-community.github.io/100.html we format and linkify each declaration using info from doc-gen. But it seems the format of this info has changed since mathlib3 and now has relative links, so these links are broken: e.g. irrational_sqrt_2 links to https://leanprover-community.github.io/Mathlib/Data/Real/Irrational.html#irrational_sqrt_two

We could add a <base> tag to this page (and check that none of the other links are relative), or find some other solution.

yaml parsing has bug with same-title entries

In the section "Hilbert spaces" of the undergrad.yaml file, there are two entries called "its completeness". It makes sense in context:

...
dual space: 'normed_space.dual.normed_space'
Riesz representation theorem: 'inner_product_space.to_dual'
inner product space $l^2$: 'lp.inner_product_space'
its completeness: 'lp.complete_space'
inner product space $L^2$: 'measure_theory.L2.inner_product_space'
its completeness: 'measure_theory.Lp.complete_space'
...

On the current display of the website, the first "its completeness" links to entry for the second "its completeness", and the second "its completeness" does not appear at all.

notation docs

A first start provided by @Vierkantor :
https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/big.20ops/near/195941698

when deciding how to pretty-print an expression,
Lean looks up the notations associated to the head of the expression (e.g. `finset.sum`).
It tries them one by one, until it finds a notation that matches the expression,
then uses that to pretty-print.
The order in which they are tried is the order in which they are stored in the environment structure,
which in this case is the order in which they are defined.
Apparently the priority information is thrown away
(typically it would be highest-priority first, then by order of definition).
This is why the order matters.

A notation definition is associated to the head of the expression it expands to, so
```lean
notation ∑ binders ,  r:(scoped f, finset.sum finset.univ f) := r
```
is associated to the head of the expansion of `r`,
which is the head of `finset.sum finset.univ f`, which is `finset.sum`.
But `finset.univ.sum` doesn't get expanded to `finset.sum finset.univ` at that point,
so you have to write `finset.sum finset.univ` instead of `finset.univ.sum`.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.