Skip to content

Commit

Permalink
Fix compile errors on naming convention page (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
TwoFX authored Dec 28, 2023
1 parent e59c6a7 commit 30dd566
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions templates/contribute/naming.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,6 @@ import Mathlib.Logic.Basic
#check And.comm
#check Or.comm
#check And.assoc
#check Or.assoc
```

In particular, this includes `intro` and `elim` operations for logical
Expand All @@ -265,11 +263,12 @@ import Mathlib.Logic.Basic
#check Eq.trans
```

Note however we do not do this for axiomatic arithmetic operations
Note however we do not do this for axiomatic logical and arithmetic operations.

```lean
import Mathlib.Algebra.Group.Basic
#check and_assoc
#check mul_comm
#check mul_assoc
#check @mul_left_cancel -- multiplication is left cancelative
Expand All @@ -280,7 +279,7 @@ name of theorem simply describes the conclusion:

```lean
import Mathlib.Algebra.Ring.Basic
open nat
open Nat
#check succ_ne_zero
#check mul_zero
#check mul_one
Expand All @@ -295,7 +294,7 @@ the name may be made even shorter:
import Mathlib.Algebra.Ring.Basic
#check @neg_neg
#check nat.pred_succ
#check Nat.pred_succ
```

When an operation is written as infix, the theorem names follow
Expand All @@ -307,7 +306,7 @@ intended reference, it is necessary to describe some of the
hypotheses. The word "of" is used to separate these hypotheses:

```lean
import Mathlib.Algebra.Order.Ring.Lemmas
import Mathlib.Algebra.Order.Monoid.Lemmas
open Nat
Expand All @@ -326,6 +325,7 @@ with. For example, we use `pos`, `neg`, `nonpos`, `nonneg` rather than
`zero_lt`, `lt_zero`, `le_zero`, and `zero_le`.

```lean
import Mathlib.Algebra.Order.Monoid.Lemmas
import Mathlib.Algebra.Order.Ring.Lemmas
open Nat
Expand All @@ -345,6 +345,7 @@ Sometimes the word "left" or "right" is helpful to describe variants
of a theorem.

```lean
import Mathlib.Algebra.Order.Monoid.Lemmas
import Mathlib.Algebra.Order.Ring.Lemmas
open Nat
Expand Down

0 comments on commit 30dd566

Please sign in to comment.