Skip to content

Print Theorems as Latex (without proof) #3

Description

@jngross95

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}  

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions