Skip to content

Commit

Permalink
feat: Quotient type chapter (#265)
Browse files Browse the repository at this point in the history
Closes #51
  • Loading branch information
david-christiansen authored Jan 31, 2025
1 parent b5a465c commit 417a332
Show file tree
Hide file tree
Showing 7 changed files with 685 additions and 13 deletions.
4 changes: 4 additions & 0 deletions .vale/styles/config/ignore/terms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ quasiquotation
quasiquotations
quasiquote
quasiquoted
quotiented
recursor
recursor's
recursors
Expand All @@ -121,6 +122,9 @@ scrutinees
se
semigroup
semireducible
setoid
setoid's
setoids
simp
simproc
simprocs
Expand Down
7 changes: 7 additions & 0 deletions Manual.lean
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ Setoid
Squash
Subsingleton
WellFoundedRelation
Equivalence
HasEquiv
Lake
Lake.RecBuildM
Lake.FetchM
Expand Down Expand Up @@ -282,6 +284,11 @@ String.fromUTF8.loop
String.one_le_csize
```

```exceptions
Quot.indep
Quot.lcInv
```

```exceptions
String.sluggify
```
Expand Down
3 changes: 3 additions & 0 deletions Manual/Language.lean
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,9 @@ scoped
:::

# Axioms
%%%
tag := "axioms"
%%%

:::planned 78
Describe {deftech}_axioms_ in detail
Expand Down
2 changes: 1 addition & 1 deletion Manual/Language/Functions.lean
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ In addition to reduction and renaming of bound variables, definitional equality
Given {lean}`f` with type {lean}`(x : α) → β x`, {lean}`f` is definitionally equal to {lean}`fun x => f x`.
::::

When reasoning about functions, the theorem {lean}`funext`{margin}[Unlike some intensional type theories, {lean}`funext` is a theorem in Lean. It can be proved using {tech}[quotient] types.] or the corresponding tactics {tactic}`funext` or {tactic}`ext` can be used to prove that two functions are equal if they map equal inputs to equal outputs.
When reasoning about functions, the theorem {lean}`funext`{margin}[Unlike some intensional type theories, {lean}`funext` is a theorem in Lean. It can be proved {ref "quotient-funext"}[using quotient types].] or the corresponding tactics {tactic}`funext` or {tactic}`ext` can be used to prove that two functions are equal if they map equal inputs to equal outputs.

{docstring funext}

Expand Down
2 changes: 1 addition & 1 deletion Manual/Language/InductiveTypes.lean
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ tag := "inductive-types"


{deftech}_Inductive types_ are the primary means of introducing new types to Lean.
While {tech}[universes] and {tech}[functions] are built-in primitives that could not be added by users, every other type in Lean is either an inductive type or defined in terms of universes, functions, and inductive types.
While {tech}[universes], {tech}[functions], and {tech}[quotient types] are built-in primitives that could not be added by users, every other type in Lean is either an inductive type or defined in terms of universes, functions, and inductive types.
Inductive types are specified by their {deftech}_type constructors_ {index}[type constructor] and their {deftech}_constructors_; {index}[constructor] their other properties are derived from these.
Each inductive type has a single type constructor, which may take both {tech}[universe parameters] and ordinary parameters.
Inductive types may have any number of constructors; these constructors introduce new values whose types are headed by the inductive type's type constructor.
Expand Down
Loading

0 comments on commit 417a332

Please sign in to comment.