Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print Theorems as Latex (without proof) #3

Open
jngross95 opened this issue Jul 16, 2024 · 0 comments
Open

Print Theorems as Latex (without proof) #3

jngross95 opened this issue Jul 16, 2024 · 0 comments

Comments

@jngross95
Copy link

Dear LeanTex developers,

I would like to automatically convert Lean theorems (without proof) into LaTeX code. However, I am unsure how to use the library. The project provides examples of how to test the library, where the LaTeX code needs to be entered. How can I convert terms in my own project? How can I write a method like #print_latex my_theorem?

Example:

theorem my_theorem{R : Type*} [Field R]  (a b c d: R) (hb : b ≠ 0) (hd : d ≠ 0)  :

      (a / b) * (c / d) = (a*c) / (b*d) := by

field_simp [hb, hd]

#print_latex my_theorem

output:

$\frac{a}{b} \cdot \frac{c}{d} = \frac{a \cdot c}{b \cdot d} $

Possibly also with the hypotheses $b \neq 0, d \neq 0$ and the types $a b c d : R$.

Latex-Code:

\frac{a}{b} \cdot \frac{c}{d} = \frac{a \cdot c}{b \cdot d}  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant