2. Code Panels
In-module external definition panel sample.
Lean code for Definition2.1●1 definition
Associated Lean declarations
-
defdefined in PreviewRuntimeShowcase/Chapters/CodePanels.leancomplete
def PreviewRuntimeShowcase.CodePanelDecls.previewExternalDefinition
PreviewRuntimeShowcase.CodePanelDecls.previewExternalDefinition : Nat: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.def PreviewRuntimeShowcase.CodePanelDecls.previewExternalDefinition
PreviewRuntimeShowcase.CodePanelDecls.previewExternalDefinition : Nat: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.
In-module external Lean abbrev panel sample. Status summaries stay definition-like, while the rendered declaration preserves the abbrev keyword.
Lean code for Definition2.2●1 definition
Associated Lean declarations
-
abbrevdefined in PreviewRuntimeShowcase/Chapters/CodePanels.leancomplete
abbrev PreviewRuntimeShowcase.CodePanelDecls.previewExternalAbbrev
PreviewRuntimeShowcase.CodePanelDecls.previewExternalAbbrev : Nat: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.abbrev PreviewRuntimeShowcase.CodePanelDecls.previewExternalAbbrev
PreviewRuntimeShowcase.CodePanelDecls.previewExternalAbbrev : Nat: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.
In-module external unsafe definition panel sample.
Lean code for Definition2.3●1 definition
Associated Lean declarations
-
defdefined in PreviewRuntimeShowcase/Chapters/CodePanels.leancomplete
unsafe def PreviewRuntimeShowcase.CodePanelDecls.previewExternalUnsafeDefinition
PreviewRuntimeShowcase.CodePanelDecls.previewExternalUnsafeDefinition : Nat: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.unsafe def PreviewRuntimeShowcase.CodePanelDecls.previewExternalUnsafeDefinition
PreviewRuntimeShowcase.CodePanelDecls.previewExternalUnsafeDefinition : Nat: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.
External definition panel sample with multiple documented Lean definitions.
Lean code for Definition2.4●2 definitions
Associated Lean declarations
-
defdefined in PreviewRuntimeShowcase/Chapters/CodePanels.leancomplete
def PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedDefinition
PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedDefinition : NatThe first documented preview definition used to test multi-declaration docstring rendering in external code panels.: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.def PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedDefinition
PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedDefinition : NatThe first documented preview definition used to test multi-declaration docstring rendering in external code panels.: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.The first documented preview definition used to test multi-declaration docstring rendering in external code panels.
-
defdefined in PreviewRuntimeShowcase/Chapters/CodePanels.leancomplete
def PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedFunction
PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedFunction (n : Nat) : NatAdds a small preview offset to `n`. The second paragraph keeps paragraph spacing visible when several documented definitions appear in the same code panel.(nNat: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.) : NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.def PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedFunction
PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedFunction (n : Nat) : NatAdds a small preview offset to `n`. The second paragraph keeps paragraph spacing visible when several documented definitions appear in the same code panel.(nNat: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.) : NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.Adds a small preview offset to `n`. The second paragraph keeps paragraph spacing visible when several documented definitions appear in the same code panel.
In-module external theorem panel sample.
Lean code for Theorem2.5●1 theorem
Associated Lean declarations
-
theoremdefined in PreviewRuntimeShowcase/Chapters/CodePanels.leancomplete
theorem PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheorem
PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheorem : True: TrueTrue : Prop`True` is a proposition and has only an introduction rule, `True.intro : True`. In other words, `True` is simply true, and has a canonical proof, `True.intro` For more information: [Propositional Logic](https://lean-lang.org/theorem_proving_in_lean4/propositions_and_proofs.html#propositional-logic)theorem PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheorem
PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheorem : True: TrueTrue : Prop`True` is a proposition and has only an introduction rule, `True.intro : True`. In other words, `True` is simply true, and has a canonical proof, `True.intro` For more information: [Propositional Logic](https://lean-lang.org/theorem_proving_in_lean4/propositions_and_proofs.html#propositional-logic)
External theorem panel sample with a declaration docstring.
Lean code for Theorem2.6●1 theorem
Associated Lean declarations
-
theoremdefined in PreviewRuntimeShowcase/Chapters/CodePanels.leancomplete
theorem PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedTheorem
PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedTheorem : TrueA documented preview theorem whose statement is intentionally small.: TrueTrue : Prop`True` is a proposition and has only an introduction rule, `True.intro : True`. In other words, `True` is simply true, and has a canonical proof, `True.intro` For more information: [Propositional Logic](https://lean-lang.org/theorem_proving_in_lean4/propositions_and_proofs.html#propositional-logic)theorem PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedTheorem
PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedTheorem : TrueA documented preview theorem whose statement is intentionally small.: TrueTrue : Prop`True` is a proposition and has only an introduction rule, `True.intro : True`. In other words, `True` is simply true, and has a canonical proof, `True.intro` For more information: [Propositional Logic](https://lean-lang.org/theorem_proving_in_lean4/propositions_and_proofs.html#propositional-logic)A documented preview theorem whose statement is intentionally small.
In-module external theorem panel sample with multiple complete declarations.
Lean code for Theorem2.7●2 theorems
Associated Lean declarations
-
theoremdefined in PreviewRuntimeShowcase/Chapters/CodePanels.leancomplete
theorem PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheorem
PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheorem : True: TrueTrue : Prop`True` is a proposition and has only an introduction rule, `True.intro : True`. In other words, `True` is simply true, and has a canonical proof, `True.intro` For more information: [Propositional Logic](https://lean-lang.org/theorem_proving_in_lean4/propositions_and_proofs.html#propositional-logic)theorem PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheorem
PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheorem : True: TrueTrue : Prop`True` is a proposition and has only an introduction rule, `True.intro : True`. In other words, `True` is simply true, and has a canonical proof, `True.intro` For more information: [Propositional Logic](https://lean-lang.org/theorem_proving_in_lean4/propositions_and_proofs.html#propositional-logic) -
theoremdefined in PreviewRuntimeShowcase/Chapters/CodePanels.leancomplete
theorem PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheoremTwo
PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheoremTwo : True: TrueTrue : Prop`True` is a proposition and has only an introduction rule, `True.intro : True`. In other words, `True` is simply true, and has a canonical proof, `True.intro` For more information: [Propositional Logic](https://lean-lang.org/theorem_proving_in_lean4/propositions_and_proofs.html#propositional-logic)theorem PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheoremTwo
PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheoremTwo : True: TrueTrue : Prop`True` is a proposition and has only an introduction rule, `True.intro : True`. In other words, `True` is simply true, and has a canonical proof, `True.intro` For more information: [Propositional Logic](https://lean-lang.org/theorem_proving_in_lean4/propositions_and_proofs.html#propositional-logic)
-
PreviewRuntimeShowcase.CodePanelDecls.previewExternalSorry[sorry in proof]
In-module external theorem panel with a sorry-backed declaration.
Lean code for Theorem2.8●1 theorem, incomplete
Associated Lean declarations
-
PreviewRuntimeShowcase.CodePanelDecls.previewExternalSorry[sorry in proof]
-
PreviewRuntimeShowcase.CodePanelDecls.previewExternalSorry[sorry in proof]
-
theoremdefined in PreviewRuntimeShowcase/Chapters/CodePanels.leancontains sorry
theorem PreviewRuntimeShowcase.CodePanelDecls.previewExternalSorry
PreviewRuntimeShowcase.CodePanelDecls.previewExternalSorry : True: TrueTrue : Prop`True` is a proposition and has only an introduction rule, `True.intro : True`. In other words, `True` is simply true, and has a canonical proof, `True.intro` For more information: [Propositional Logic](https://lean-lang.org/theorem_proving_in_lean4/propositions_and_proofs.html#propositional-logic)theorem PreviewRuntimeShowcase.CodePanelDecls.previewExternalSorry
PreviewRuntimeShowcase.CodePanelDecls.previewExternalSorry : True: TrueTrue : Prop`True` is a proposition and has only an introduction rule, `True.intro : True`. In other words, `True` is simply true, and has a canonical proof, `True.intro` For more information: [Propositional Logic](https://lean-lang.org/theorem_proving_in_lean4/propositions_and_proofs.html#propositional-logic)
In-module external theorem panel sample with mixed declaration health.
Lean code for Theorem2.9●2 theorems, 1 incomplete
Associated Lean declarations
-
theoremdefined in PreviewRuntimeShowcase/Chapters/CodePanels.leancomplete
theorem PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheorem
PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheorem : True: TrueTrue : Prop`True` is a proposition and has only an introduction rule, `True.intro : True`. In other words, `True` is simply true, and has a canonical proof, `True.intro` For more information: [Propositional Logic](https://lean-lang.org/theorem_proving_in_lean4/propositions_and_proofs.html#propositional-logic)theorem PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheorem
PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheorem : True: TrueTrue : Prop`True` is a proposition and has only an introduction rule, `True.intro : True`. In other words, `True` is simply true, and has a canonical proof, `True.intro` For more information: [Propositional Logic](https://lean-lang.org/theorem_proving_in_lean4/propositions_and_proofs.html#propositional-logic) -
theoremdefined in PreviewRuntimeShowcase/Chapters/CodePanels.leancontains sorry
theorem PreviewRuntimeShowcase.CodePanelDecls.previewExternalSorry
PreviewRuntimeShowcase.CodePanelDecls.previewExternalSorry : True: TrueTrue : Prop`True` is a proposition and has only an introduction rule, `True.intro : True`. In other words, `True` is simply true, and has a canonical proof, `True.intro` For more information: [Propositional Logic](https://lean-lang.org/theorem_proving_in_lean4/propositions_and_proofs.html#propositional-logic)theorem PreviewRuntimeShowcase.CodePanelDecls.previewExternalSorry
PreviewRuntimeShowcase.CodePanelDecls.previewExternalSorry : True: TrueTrue : Prop`True` is a proposition and has only an introduction rule, `True.intro : True`. In other words, `True` is simply true, and has a canonical proof, `True.intro` For more information: [Propositional Logic](https://lean-lang.org/theorem_proving_in_lean4/propositions_and_proofs.html#propositional-logic)
-
PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheorem[complete] -
PreviewRuntimeShowcase.CodePanelDecls.previewExternalMissing[missing declaration]
External theorem panel sample with multiple references and one missing declaration.
Lean code for Theorem2.10●2 declarations, 1 missing
Associated Lean declarations
-
PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheorem[complete]
-
PreviewRuntimeShowcase.CodePanelDecls.previewExternalMissing[missing declaration]
-
PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheorem[complete] -
PreviewRuntimeShowcase.CodePanelDecls.previewExternalMissing[missing declaration]
-
theoremdefined in PreviewRuntimeShowcase/Chapters/CodePanels.leancomplete
theorem PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheorem
PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheorem : True: TrueTrue : Prop`True` is a proposition and has only an introduction rule, `True.intro : True`. In other words, `True` is simply true, and has a canonical proof, `True.intro` For more information: [Propositional Logic](https://lean-lang.org/theorem_proving_in_lean4/propositions_and_proofs.html#propositional-logic)theorem PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheorem
PreviewRuntimeShowcase.CodePanelDecls.previewExternalTheorem : True: TrueTrue : Prop`True` is a proposition and has only an introduction rule, `True.intro : True`. In other words, `True` is simply true, and has a canonical proof, `True.intro` For more information: [Propositional Logic](https://lean-lang.org/theorem_proving_in_lean4/propositions_and_proofs.html#propositional-logic) -
PreviewRuntimeShowcase.CodePanelDecls.previewExternalMissingmissing declarationdeclaration not found (name was not present during directive/code-block registration)
-
Nat.add[complete]
Out-of-module external definition panel sample.
Lean code for Definition2.11●1 definition
Associated Lean declarations
-
Nat.add[complete]
-
Nat.add[complete]
-
defdefined in Init/Prelude.leancomplete
def Nat.add
Nat.add : Nat → Nat → NatAddition of natural numbers, typically used via the `+` operator. This function is overridden in both the kernel and the compiler to efficiently evaluate using the arbitrary-precision arithmetic library. The definition provided here is the logical model.: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.→ NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.→ NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.def Nat.add
Nat.add : Nat → Nat → NatAddition of natural numbers, typically used via the `+` operator. This function is overridden in both the kernel and the compiler to efficiently evaluate using the arbitrary-precision arithmetic library. The definition provided here is the logical model.: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.→ NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.→ NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.Addition of natural numbers, typically used via the `+` operator. This function is overridden in both the kernel and the compiler to efficiently evaluate using the arbitrary-precision arithmetic library. The definition provided here is the logical model.
-
Nat.add_assoc[complete]
Out-of-module external theorem panel sample.
Lean code for Theorem2.12●1 theorem
Associated Lean declarations
-
Nat.add_assoc[complete]
-
Nat.add_assoc[complete]
-
theoremdefined in Init/Data/Nat/Basic.leancomplete
theorem Nat.add_assoc
Nat.add_assoc (n m k : Nat) : n + m + k = n + (m + k)(nNatmNatkNat: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.) : nNat+HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `+` in identifiers is `add`.mNat+HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `+` in identifiers is `add`.kNat=Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`. We use `a = b` as notation for `Eq a b`. A fundamental property of equality is that it is an equivalence relation. ``` variable (α : Type) (a b c d : α) variable (hab : a = b) (hcb : c = b) (hcd : c = d) example : a = d := Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd ``` Equality is much more than an equivalence relation, however. It has the important property that every assertion respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value. That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`. Example: ``` example (α : Type) (a b : α) (p : α → Prop) (h1 : a = b) (h2 : p a) : p b := Eq.subst h1 h2 example (α : Type) (a b : α) (p : α → Prop) (h1 : a = b) (h2 : p a) : p b := h1 ▸ h2 ``` The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`. For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality) Conventions for notations in identifiers: * The recommended spelling of `=` in identifiers is `eq`.nNat+HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `+` in identifiers is `add`.(HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `+` in identifiers is `add`.mNat+HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `+` in identifiers is `add`.kNat)HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `+` in identifiers is `add`.theorem Nat.add_assoc
Nat.add_assoc (n m k : Nat) : n + m + k = n + (m + k)(nNatmNatkNat: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.) : nNat+HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `+` in identifiers is `add`.mNat+HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `+` in identifiers is `add`.kNat=Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`. We use `a = b` as notation for `Eq a b`. A fundamental property of equality is that it is an equivalence relation. ``` variable (α : Type) (a b c d : α) variable (hab : a = b) (hcb : c = b) (hcd : c = d) example : a = d := Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd ``` Equality is much more than an equivalence relation, however. It has the important property that every assertion respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value. That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`. Example: ``` example (α : Type) (a b : α) (p : α → Prop) (h1 : a = b) (h2 : p a) : p b := Eq.subst h1 h2 example (α : Type) (a b : α) (p : α → Prop) (h1 : a = b) (h2 : p a) : p b := h1 ▸ h2 ``` The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`. For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality) Conventions for notations in identifiers: * The recommended spelling of `=` in identifiers is `eq`.nNat+HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `+` in identifiers is `add`.(HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `+` in identifiers is `add`.mNat+HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `+` in identifiers is `add`.kNat)HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `+` in identifiers is `add`.
-
PreviewRuntimeShowcase.CodePanelDecls.previewExternalMissing[missing declaration]
External declaration panel with a missing declaration.
Lean code for Definition2.13●1 declaration, 1 missing
Associated Lean declarations
-
PreviewRuntimeShowcase.CodePanelDecls.previewExternalMissing[missing declaration]
-
PreviewRuntimeShowcase.CodePanelDecls.previewExternalMissing[missing declaration]
-
PreviewRuntimeShowcase.CodePanelDecls.previewExternalMissingmissing declarationdeclaration not found (name was not present during directive/code-block registration)
-
PreviewRuntimeShowcase.CodePanelDecls.previewExternalAxiom[axiom-like (no body)]
External theorem panel with an axiom-like declaration.
Lean code for Theorem2.14●1 definition, incomplete
Associated Lean declarations
-
PreviewRuntimeShowcase.CodePanelDecls.previewExternalAxiom[axiom-like (no body)]
-
PreviewRuntimeShowcase.CodePanelDecls.previewExternalAxiom[axiom-like (no body)]
-
axiomdefined in PreviewRuntimeShowcase/Chapters/CodePanels.leanaxiom-like
axiom PreviewRuntimeShowcase.CodePanelDecls.previewExternalAxiom
PreviewRuntimeShowcase.CodePanelDecls.previewExternalAxiom : True: TrueTrue : Prop`True` is a proposition and has only an introduction rule, `True.intro : True`. In other words, `True` is simply true, and has a canonical proof, `True.intro` For more information: [Propositional Logic](https://lean-lang.org/theorem_proving_in_lean4/propositions_and_proofs.html#propositional-logic)axiom PreviewRuntimeShowcase.CodePanelDecls.previewExternalAxiom
PreviewRuntimeShowcase.CodePanelDecls.previewExternalAxiom : True: TrueTrue : Prop`True` is a proposition and has only an introduction rule, `True.intro : True`. In other words, `True` is simply true, and has a canonical proof, `True.intro` For more information: [Propositional Logic](https://lean-lang.org/theorem_proving_in_lean4/propositions_and_proofs.html#propositional-logic)
External inductive panel sample with documented constructors.
Lean code for Definition2.15●1 definition
Associated Lean declarations
-
inductivedefined in PreviewRuntimeShowcase/Chapters/CodePanels.leancomplete
inductive PreviewRuntimeShowcase.CodePanelDecls.PreviewStage
PreviewRuntimeShowcase.CodePanelDecls.PreviewStage : TypeA small inductive type used to exercise rendered constructor lists.: TypeA type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`.inductive PreviewRuntimeShowcase.CodePanelDecls.PreviewStage
PreviewRuntimeShowcase.CodePanelDecls.PreviewStage : TypeA small inductive type used to exercise rendered constructor lists.: TypeA type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`.A small inductive type used to exercise rendered constructor lists.
Constructors
PreviewRuntimeShowcase.CodePanelDecls.PreviewStage.initial
PreviewRuntimeShowcase.CodePanelDecls.PreviewStage.initial : PreviewRuntimeShowcase.CodePanelDecls.PreviewStageThe initial stage of the preview workflow.: PreviewRuntimeShowcase.CodePanelDecls.PreviewStagePreviewRuntimeShowcase.CodePanelDecls.PreviewStage : TypeA small inductive type used to exercise rendered constructor lists.The initial stage of the preview workflow.
PreviewRuntimeShowcase.CodePanelDecls.PreviewStage.step
PreviewRuntimeShowcase.CodePanelDecls.PreviewStage.step (n : Nat) : PreviewRuntimeShowcase.CodePanelDecls.PreviewStageA numbered follow-up stage.(nNat: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.) : PreviewRuntimeShowcase.CodePanelDecls.PreviewStagePreviewRuntimeShowcase.CodePanelDecls.PreviewStage : TypeA small inductive type used to exercise rendered constructor lists.A numbered follow-up stage.
External class panel sample with documented methods.
Lean code for Definition2.16●1 definition
Associated Lean declarations
-
classdefined in PreviewRuntimeShowcase/Chapters/CodePanels.leancomplete
class PreviewRuntimeShowcase.CodePanelDecls.PreviewFold
PreviewRuntimeShowcase.CodePanelDecls.PreviewFold (α : Type) : TypeA compact class used to exercise rendered method documentation.(αType: TypeA type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`.) : TypeA type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`.class PreviewRuntimeShowcase.CodePanelDecls.PreviewFold
PreviewRuntimeShowcase.CodePanelDecls.PreviewFold (α : Type) : TypeA compact class used to exercise rendered method documentation.(αType: TypeA type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`.) : TypeA type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`.A compact class used to exercise rendered method documentation.
Methods
neutral
αThe neutral preview value.: αTypeThe neutral preview value.
combine
α → α → αCombine two preview values.: αType→ αType→ αTypeCombine two preview values.
External structure panel sample with a field-heavy package shape.
Lean code for Definition2.17●1 definition
Associated Lean declarations
-
structuredefined in PreviewRuntimeShowcase/Chapters/CodePanels.leancomplete
structure PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage
PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage : TypeA preview Frey package is a compact stand-in for a structure whose constructor duplicates a field-heavy mathematical record.: TypeA type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`.structure PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage
PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage : TypeA preview Frey package is a compact stand-in for a structure whose constructor duplicates a field-heavy mathematical record.: TypeA type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`.A preview Frey package is a compact stand-in for a structure whose constructor duplicates a field-heavy mathematical record.
Fields
a
NatThe first value in the package.: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.The first value in the package.
b
NatThe second value in the package.: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.The second value in the package.
c
NatThe target value in the package.: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.The target value in the package.
p
NatThe prime-like exponent under discussion.: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.The prime-like exponent under discussion.
hp5
5 ≤ self.pThe lower-bound hypothesis on `p`.: 5 ≤LE.le.{u} {α : Type u} [self : LE α] : α → α → PropThe less-equal relation: `x ≤ y` Conventions for notations in identifiers: * The recommended spelling of `≤` in identifiers is `le`.selfPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.pPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.p (self : PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage) : NatThe prime-like exponent under discussion.The lower-bound hypothesis on `p`.
hFLT
self.a ^ self.p + self.b ^ self.p = self.c ^ self.pThe Fermat-like equation carried by the package.: selfPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.aPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.a (self : PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage) : NatThe first value in the package.^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `^` in identifiers is `pow`.selfPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.pPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.p (self : PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage) : NatThe prime-like exponent under discussion.+HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `+` in identifiers is `add`.selfPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.bPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.b (self : PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage) : NatThe second value in the package.^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `^` in identifiers is `pow`.selfPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.pPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.p (self : PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage) : NatThe prime-like exponent under discussion.=Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`. We use `a = b` as notation for `Eq a b`. A fundamental property of equality is that it is an equivalence relation. ``` variable (α : Type) (a b c d : α) variable (hab : a = b) (hcb : c = b) (hcd : c = d) example : a = d := Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd ``` Equality is much more than an equivalence relation, however. It has the important property that every assertion respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value. That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`. Example: ``` example (α : Type) (a b : α) (p : α → Prop) (h1 : a = b) (h2 : p a) : p b := Eq.subst h1 h2 example (α : Type) (a b : α) (p : α → Prop) (h1 : a = b) (h2 : p a) : p b := h1 ▸ h2 ``` The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`. For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality) Conventions for notations in identifiers: * The recommended spelling of `=` in identifiers is `eq`.selfPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.cPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.c (self : PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage) : NatThe target value in the package.^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `^` in identifiers is `pow`.selfPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.pPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.p (self : PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage) : NatThe prime-like exponent under discussion.The Fermat-like equation carried by the package.
External theorem panel sample with a Markdown-like docstring.
Lean code for Theorem2.18●1 theorem
Associated Lean declarations
-
theoremdefined in PreviewRuntimeShowcase/Chapters/CodePanels.leancomplete
theorem PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.ofCounterexample
PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.ofCounterexample {a b c p : Nat} (hp5 : 5 ≤ p) (H : a ^ p + b ^ p = c ^ p) : Nonempty PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackageGiven a counterexample `a^p + b^p = c^p` with `p >= 5`, there exists a preview Frey package.{aNatbNatcNatpNat: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.} (hp55 ≤ p: 5 ≤LE.le.{u} {α : Type u} [self : LE α] : α → α → PropThe less-equal relation: `x ≤ y` Conventions for notations in identifiers: * The recommended spelling of `≤` in identifiers is `le`.pNat) (Ha ^ p + b ^ p = c ^ p: aNat^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `^` in identifiers is `pow`.pNat+HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `+` in identifiers is `add`.bNat^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `^` in identifiers is `pow`.pNat=Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`. We use `a = b` as notation for `Eq a b`. A fundamental property of equality is that it is an equivalence relation. ``` variable (α : Type) (a b c d : α) variable (hab : a = b) (hcb : c = b) (hcd : c = d) example : a = d := Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd ``` Equality is much more than an equivalence relation, however. It has the important property that every assertion respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value. That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`. Example: ``` example (α : Type) (a b : α) (p : α → Prop) (h1 : a = b) (h2 : p a) : p b := Eq.subst h1 h2 example (α : Type) (a b : α) (p : α → Prop) (h1 : a = b) (h2 : p a) : p b := h1 ▸ h2 ``` The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`. For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality) Conventions for notations in identifiers: * The recommended spelling of `=` in identifiers is `eq`.cNat^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `^` in identifiers is `pow`.pNat) : NonemptyNonempty.{u} (α : Sort u) : Prop`Nonempty α` is a typeclass that says that `α` is not an empty type, that is, there exists an element in the type. It differs from `Inhabited α` in that `Nonempty α` is a `Prop`, which means that it does not actually carry an element of `α`, only a proof that *there exists* such an element. Given `Nonempty α`, you can construct an element of `α` *nonconstructively* using `Classical.choice`.PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackagePreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage : TypeA preview Frey package is a compact stand-in for a structure whose constructor duplicates a field-heavy mathematical record.theorem PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.ofCounterexample
PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.ofCounterexample {a b c p : Nat} (hp5 : 5 ≤ p) (H : a ^ p + b ^ p = c ^ p) : Nonempty PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackageGiven a counterexample `a^p + b^p = c^p` with `p >= 5`, there exists a preview Frey package.{aNatbNatcNatpNat: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.} (hp55 ≤ p: 5 ≤LE.le.{u} {α : Type u} [self : LE α] : α → α → PropThe less-equal relation: `x ≤ y` Conventions for notations in identifiers: * The recommended spelling of `≤` in identifiers is `le`.pNat) (Ha ^ p + b ^ p = c ^ p: aNat^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `^` in identifiers is `pow`.pNat+HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `+` in identifiers is `add`.bNat^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `^` in identifiers is `pow`.pNat=Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`. We use `a = b` as notation for `Eq a b`. A fundamental property of equality is that it is an equivalence relation. ``` variable (α : Type) (a b c d : α) variable (hab : a = b) (hcb : c = b) (hcd : c = d) example : a = d := Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd ``` Equality is much more than an equivalence relation, however. It has the important property that every assertion respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value. That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`. Example: ``` example (α : Type) (a b : α) (p : α → Prop) (h1 : a = b) (h2 : p a) : p b := Eq.subst h1 h2 example (α : Type) (a b : α) (p : α → Prop) (h1 : a = b) (h2 : p a) : p b := h1 ▸ h2 ``` The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`. For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality) Conventions for notations in identifiers: * The recommended spelling of `=` in identifiers is `eq`.cNat^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `^` in identifiers is `pow`.pNat) : NonemptyNonempty.{u} (α : Sort u) : Prop`Nonempty α` is a typeclass that says that `α` is not an empty type, that is, there exists an element in the type. It differs from `Inhabited α` in that `Nonempty α` is a `Prop`, which means that it does not actually carry an element of `α`, only a proof that *there exists* such an element. Given `Nonempty α`, you can construct an element of `α` *nonconstructively* using `Classical.choice`.PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackagePreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage : TypeA preview Frey package is a compact stand-in for a structure whose constructor duplicates a field-heavy mathematical record.Given a counterexample `a^p + b^p = c^p` with `p >= 5`, there exists a preview Frey package.
-
PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedDefinition[complete] -
PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedTheorem[complete] -
PreviewRuntimeShowcase.CodePanelDecls.PreviewStage[complete] -
PreviewRuntimeShowcase.CodePanelDecls.PreviewFold[complete] -
PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage[complete]
External declaration panel sample mixing definitions, theorems, inductives, classes, and structures.
Lean code for Definition2.19●5 declarations
Associated Lean declarations
-
PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedDefinition[complete]
-
PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedTheorem[complete]
-
PreviewRuntimeShowcase.CodePanelDecls.PreviewStage[complete]
-
PreviewRuntimeShowcase.CodePanelDecls.PreviewFold[complete]
-
PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage[complete]
-
PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedDefinition[complete] -
PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedTheorem[complete] -
PreviewRuntimeShowcase.CodePanelDecls.PreviewStage[complete] -
PreviewRuntimeShowcase.CodePanelDecls.PreviewFold[complete] -
PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage[complete]
-
defdefined in PreviewRuntimeShowcase/Chapters/CodePanels.leancomplete
def PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedDefinition
PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedDefinition : NatThe first documented preview definition used to test multi-declaration docstring rendering in external code panels.: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.def PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedDefinition
PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedDefinition : NatThe first documented preview definition used to test multi-declaration docstring rendering in external code panels.: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.The first documented preview definition used to test multi-declaration docstring rendering in external code panels.
-
theoremdefined in PreviewRuntimeShowcase/Chapters/CodePanels.leancomplete
theorem PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedTheorem
PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedTheorem : TrueA documented preview theorem whose statement is intentionally small.: TrueTrue : Prop`True` is a proposition and has only an introduction rule, `True.intro : True`. In other words, `True` is simply true, and has a canonical proof, `True.intro` For more information: [Propositional Logic](https://lean-lang.org/theorem_proving_in_lean4/propositions_and_proofs.html#propositional-logic)theorem PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedTheorem
PreviewRuntimeShowcase.CodePanelDecls.previewDocstringedTheorem : TrueA documented preview theorem whose statement is intentionally small.: TrueTrue : Prop`True` is a proposition and has only an introduction rule, `True.intro : True`. In other words, `True` is simply true, and has a canonical proof, `True.intro` For more information: [Propositional Logic](https://lean-lang.org/theorem_proving_in_lean4/propositions_and_proofs.html#propositional-logic)A documented preview theorem whose statement is intentionally small.
-
inductivedefined in PreviewRuntimeShowcase/Chapters/CodePanels.leancomplete
inductive PreviewRuntimeShowcase.CodePanelDecls.PreviewStage
PreviewRuntimeShowcase.CodePanelDecls.PreviewStage : TypeA small inductive type used to exercise rendered constructor lists.: TypeA type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`.inductive PreviewRuntimeShowcase.CodePanelDecls.PreviewStage
PreviewRuntimeShowcase.CodePanelDecls.PreviewStage : TypeA small inductive type used to exercise rendered constructor lists.: TypeA type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`.A small inductive type used to exercise rendered constructor lists.
Constructors
PreviewRuntimeShowcase.CodePanelDecls.PreviewStage.initial
PreviewRuntimeShowcase.CodePanelDecls.PreviewStage.initial : PreviewRuntimeShowcase.CodePanelDecls.PreviewStageThe initial stage of the preview workflow.: PreviewRuntimeShowcase.CodePanelDecls.PreviewStagePreviewRuntimeShowcase.CodePanelDecls.PreviewStage : TypeA small inductive type used to exercise rendered constructor lists.The initial stage of the preview workflow.
PreviewRuntimeShowcase.CodePanelDecls.PreviewStage.step
PreviewRuntimeShowcase.CodePanelDecls.PreviewStage.step (n : Nat) : PreviewRuntimeShowcase.CodePanelDecls.PreviewStageA numbered follow-up stage.(nNat: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.) : PreviewRuntimeShowcase.CodePanelDecls.PreviewStagePreviewRuntimeShowcase.CodePanelDecls.PreviewStage : TypeA small inductive type used to exercise rendered constructor lists.A numbered follow-up stage.
-
classdefined in PreviewRuntimeShowcase/Chapters/CodePanels.leancomplete
class PreviewRuntimeShowcase.CodePanelDecls.PreviewFold
PreviewRuntimeShowcase.CodePanelDecls.PreviewFold (α : Type) : TypeA compact class used to exercise rendered method documentation.(αType: TypeA type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`.) : TypeA type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`.class PreviewRuntimeShowcase.CodePanelDecls.PreviewFold
PreviewRuntimeShowcase.CodePanelDecls.PreviewFold (α : Type) : TypeA compact class used to exercise rendered method documentation.(αType: TypeA type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`.) : TypeA type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`.A compact class used to exercise rendered method documentation.
Methods
neutral
αThe neutral preview value.: αTypeThe neutral preview value.
combine
α → α → αCombine two preview values.: αType→ αType→ αTypeCombine two preview values.
-
structuredefined in PreviewRuntimeShowcase/Chapters/CodePanels.leancomplete
structure PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage
PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage : TypeA preview Frey package is a compact stand-in for a structure whose constructor duplicates a field-heavy mathematical record.: TypeA type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`.structure PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage
PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage : TypeA preview Frey package is a compact stand-in for a structure whose constructor duplicates a field-heavy mathematical record.: TypeA type universe. `Type ≡ Type 0`, `Type u ≡ Sort (u + 1)`.A preview Frey package is a compact stand-in for a structure whose constructor duplicates a field-heavy mathematical record.
Fields
a
NatThe first value in the package.: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.The first value in the package.
b
NatThe second value in the package.: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.The second value in the package.
c
NatThe target value in the package.: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.The target value in the package.
p
NatThe prime-like exponent under discussion.: NatNat : TypeThe natural numbers, starting at zero. This type is special-cased by both the kernel and the compiler, and overridden with an efficient implementation. Both use a fast arbitrary-precision arithmetic library (usually [GMP](https://gmplib.org/)); at runtime, `Nat` values that are sufficiently small are unboxed.The prime-like exponent under discussion.
hp5
5 ≤ self.pThe lower-bound hypothesis on `p`.: 5 ≤LE.le.{u} {α : Type u} [self : LE α] : α → α → PropThe less-equal relation: `x ≤ y` Conventions for notations in identifiers: * The recommended spelling of `≤` in identifiers is `le`.selfPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.pPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.p (self : PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage) : NatThe prime-like exponent under discussion.The lower-bound hypothesis on `p`.
hFLT
self.a ^ self.p + self.b ^ self.p = self.c ^ self.pThe Fermat-like equation carried by the package.: selfPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.aPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.a (self : PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage) : NatThe first value in the package.^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `^` in identifiers is `pow`.selfPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.pPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.p (self : PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage) : NatThe prime-like exponent under discussion.+HAdd.hAdd.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HAdd α β γ] : α → β → γ`a + b` computes the sum of `a` and `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `+` in identifiers is `add`.selfPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.bPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.b (self : PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage) : NatThe second value in the package.^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `^` in identifiers is `pow`.selfPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.pPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.p (self : PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage) : NatThe prime-like exponent under discussion.=Eq.{u_1} {α : Sort u_1} : α → α → PropThe equality relation. It has one introduction rule, `Eq.refl`. We use `a = b` as notation for `Eq a b`. A fundamental property of equality is that it is an equivalence relation. ``` variable (α : Type) (a b c d : α) variable (hab : a = b) (hcb : c = b) (hcd : c = d) example : a = d := Eq.trans (Eq.trans hab (Eq.symm hcb)) hcd ``` Equality is much more than an equivalence relation, however. It has the important property that every assertion respects the equivalence, in the sense that we can substitute equal expressions without changing the truth value. That is, given `h1 : a = b` and `h2 : p a`, we can construct a proof for `p b` using substitution: `Eq.subst h1 h2`. Example: ``` example (α : Type) (a b : α) (p : α → Prop) (h1 : a = b) (h2 : p a) : p b := Eq.subst h1 h2 example (α : Type) (a b : α) (p : α → Prop) (h1 : a = b) (h2 : p a) : p b := h1 ▸ h2 ``` The triangle in the second presentation is a macro built on top of `Eq.subst` and `Eq.symm`, and you can enter it by typing `\t`. For more information: [Equality](https://lean-lang.org/theorem_proving_in_lean4/quantifiers_and_equality.html#equality) Conventions for notations in identifiers: * The recommended spelling of `=` in identifiers is `eq`.selfPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.cPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.c (self : PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage) : NatThe target value in the package.^HPow.hPow.{u, v, w} {α : Type u} {β : Type v} {γ : outParam (Type w)} [self : HPow α β γ] : α → β → γ`a ^ b` computes `a` to the power of `b`. The meaning of this notation is type-dependent. Conventions for notations in identifiers: * The recommended spelling of `^` in identifiers is `pow`.selfPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.pPreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage.p (self : PreviewRuntimeShowcase.CodePanelDecls.PreviewFreyPackage) : NatThe prime-like exponent under discussion.The Fermat-like equation carried by the package.
-
panelInlineOnlyOk[complete]
Inline code panel sample with complete Lean code.
Lean code for Definition2.20
Associated Lean declarations
-
panelInlineOnlyOk[complete]
-
panelInlineOnlyOk[complete]
def panelInlineOnlyOk : Nat := 0
-
panelInlineOnlySorry[sorry in proof]
Inline code panel sample with a sorry-backed declaration.
Lean code for Definition2.21
Associated Lean declarations
-
panelInlineOnlySorry[sorry in proof]
-
panelInlineOnlySorry[sorry in proof]
theorem panelInlineOnlySorry : True := ⊢ True
All goals completed! 🐙
-
panelInlineMultiTheoremOkLeft[complete] -
panelInlineMultiTheoremOkRight[complete]
Inline code panel sample with multiple complete Lean theorems.
Lean code for Theorem2.22
Associated Lean declarations
-
panelInlineMultiTheoremOkLeft[complete]
-
panelInlineMultiTheoremOkRight[complete]
-
panelInlineMultiTheoremOkLeft[complete] -
panelInlineMultiTheoremOkRight[complete]
theorem panelInlineMultiTheoremOkLeft : True := ⊢ True
All goals completed! 🐙
theorem panelInlineMultiTheoremOkRight : True := ⊢ True
All goals completed! 🐙
-
panelInlineMultiTheoremWarningOk[complete] -
panelInlineMultiTheoremWarningSorry[sorry in proof]
Inline code panel sample with multiple Lean theorems and mixed declaration health.
Lean code for Theorem2.23
Associated Lean declarations
-
panelInlineMultiTheoremWarningOk[complete]
-
panelInlineMultiTheoremWarningSorry[sorry in proof]
-
panelInlineMultiTheoremWarningOk[complete] -
panelInlineMultiTheoremWarningSorry[sorry in proof]
theorem panelInlineMultiTheoremWarningOk : True := ⊢ True
All goals completed! 🐙
theorem panelInlineMultiTheoremWarningSorry : True := ⊢ True
All goals completed! 🐙
-
panelInlineOk[complete] -
panelInlineSorry[sorry in proof]
Inline code panel sample with mixed declaration health.
Lean code for Definition2.24
Associated Lean declarations
-
panelInlineOk[complete]
-
panelInlineSorry[sorry in proof]
-
panelInlineOk[complete] -
panelInlineSorry[sorry in proof]
def panelInlineOk : Nat := 0
theorem panelInlineSorry : True := ⊢ True
All goals completed! 🐙
-
panelInlineAxiom[axiom-like (no body)]
Inline code panel sample with an axiom-like declaration.
Lean code for Definition2.25
Associated Lean declarations
-
panelInlineAxiom[axiom-like (no body)]
-
panelInlineAxiom[axiom-like (no body)]
axiom panelInlineAxiom : True
-
PanelInlineDocstringedStructure.ctorIdx[complete] -
PanelInlineDocstringedStructure.noConfusionType[complete] -
PanelInlineDocstringedStructure[complete] -
PanelInlineDocstringedStructure.casesOn[complete] -
PanelInlineDocstringedStructure.left[complete] -
PanelInlineDocstringedStructure.mk[complete] -
PanelInlineDocstringedStructure.mk.noConfusion[complete] -
PanelInlineDocstringedStructure.noConfusion[complete] -
PanelInlineDocstringedStructure.rec[complete] -
PanelInlineDocstringedStructure.recOn[complete] -
PanelInlineDocstringedStructure.right[complete] -
PanelInlineDocstringedStructure.mk.inj[complete] -
PanelInlineDocstringedStructure.mk.injEq[complete] -
PanelInlineDocstringedStructure.mk.sizeOf_spec[complete] -
PanelInlineDocstringedStructure.ordered[complete]
Inline Lean structure sample with declaration and field docstrings.
Lean code for Definition2.26
Associated Lean declarations
-
PanelInlineDocstringedStructure.ctorIdx[complete]
-
PanelInlineDocstringedStructure.noConfusionType[complete]
-
PanelInlineDocstringedStructure[complete]
-
PanelInlineDocstringedStructure.casesOn[complete]
-
PanelInlineDocstringedStructure.left[complete]
-
PanelInlineDocstringedStructure.mk[complete]
-
PanelInlineDocstringedStructure.mk.noConfusion[complete]
-
PanelInlineDocstringedStructure.noConfusion[complete]
-
PanelInlineDocstringedStructure.rec[complete]
-
PanelInlineDocstringedStructure.recOn[complete]
-
PanelInlineDocstringedStructure.right[complete]
-
PanelInlineDocstringedStructure.mk.inj[complete]
-
PanelInlineDocstringedStructure.mk.injEq[complete]
-
PanelInlineDocstringedStructure.mk.sizeOf_spec[complete]
-
PanelInlineDocstringedStructure.ordered[complete]
-
PanelInlineDocstringedStructure.ctorIdx[complete] -
PanelInlineDocstringedStructure.noConfusionType[complete] -
PanelInlineDocstringedStructure[complete] -
PanelInlineDocstringedStructure.casesOn[complete] -
PanelInlineDocstringedStructure.left[complete] -
PanelInlineDocstringedStructure.mk[complete] -
PanelInlineDocstringedStructure.mk.noConfusion[complete] -
PanelInlineDocstringedStructure.noConfusion[complete] -
PanelInlineDocstringedStructure.rec[complete] -
PanelInlineDocstringedStructure.recOn[complete] -
PanelInlineDocstringedStructure.right[complete] -
PanelInlineDocstringedStructure.mk.inj[complete] -
PanelInlineDocstringedStructure.mk.injEq[complete] -
PanelInlineDocstringedStructure.mk.sizeOf_spec[complete] -
PanelInlineDocstringedStructure.ordered[complete]
/--
Inline package docstring used to compare literate Lean
against the external declaration renderer.
* The field `left` is shown as inline code.
* **Bold text** checks richer Markdown.
-/
structure PanelInlineDocstringedStructure where
/-- The left inline field. -/
left : Nat
/-- The right inline field. -/
right : Nat
/--
A proof-like field that keeps dependent-looking field
layout visible.
-/
ordered : left <= right
-
PanelInlineDocstringedStage.ctorElimType[complete] -
PanelInlineDocstringedStage.ctorIdx[complete] -
PanelInlineDocstringedStage.noConfusionType[complete] -
PanelInlineDocstringedStage[complete] -
PanelInlineDocstringedStage.casesOn[complete] -
PanelInlineDocstringedStage.ctorElim[complete] -
PanelInlineDocstringedStage.followup[complete] -
PanelInlineDocstringedStage.followup.elim[complete] -
PanelInlineDocstringedStage.followup.noConfusion[complete] -
PanelInlineDocstringedStage.initial[complete] -
PanelInlineDocstringedStage.initial.elim[complete] -
PanelInlineDocstringedStage.noConfusion[complete] -
PanelInlineDocstringedStage.rec[complete] -
PanelInlineDocstringedStage.recOn[complete] -
PanelInlineDocstringedStage.followup.inj[complete] -
PanelInlineDocstringedStage.followup.injEq[complete] -
PanelInlineDocstringedStage.followup.sizeOf_spec[complete] -
PanelInlineDocstringedStage.initial.sizeOf_spec[complete]
Inline Lean inductive sample with declaration and constructor docstrings.
Lean code for Definition2.27
Associated Lean declarations
-
PanelInlineDocstringedStage.ctorElimType[complete]
-
PanelInlineDocstringedStage.ctorIdx[complete]
-
PanelInlineDocstringedStage.noConfusionType[complete]
-
PanelInlineDocstringedStage[complete]
-
PanelInlineDocstringedStage.casesOn[complete]
-
PanelInlineDocstringedStage.ctorElim[complete]
-
PanelInlineDocstringedStage.followup[complete]
-
PanelInlineDocstringedStage.followup.elim[complete]
-
PanelInlineDocstringedStage.followup.noConfusion[complete]
-
PanelInlineDocstringedStage.initial[complete]
-
PanelInlineDocstringedStage.initial.elim[complete]
-
PanelInlineDocstringedStage.noConfusion[complete]
-
PanelInlineDocstringedStage.rec[complete]
-
PanelInlineDocstringedStage.recOn[complete]
-
PanelInlineDocstringedStage.followup.inj[complete]
-
PanelInlineDocstringedStage.followup.injEq[complete]
-
PanelInlineDocstringedStage.followup.sizeOf_spec[complete]
-
PanelInlineDocstringedStage.initial.sizeOf_spec[complete]
-
PanelInlineDocstringedStage.ctorElimType[complete] -
PanelInlineDocstringedStage.ctorIdx[complete] -
PanelInlineDocstringedStage.noConfusionType[complete] -
PanelInlineDocstringedStage[complete] -
PanelInlineDocstringedStage.casesOn[complete] -
PanelInlineDocstringedStage.ctorElim[complete] -
PanelInlineDocstringedStage.followup[complete] -
PanelInlineDocstringedStage.followup.elim[complete] -
PanelInlineDocstringedStage.followup.noConfusion[complete] -
PanelInlineDocstringedStage.initial[complete] -
PanelInlineDocstringedStage.initial.elim[complete] -
PanelInlineDocstringedStage.noConfusion[complete] -
PanelInlineDocstringedStage.rec[complete] -
PanelInlineDocstringedStage.recOn[complete] -
PanelInlineDocstringedStage.followup.inj[complete] -
PanelInlineDocstringedStage.followup.injEq[complete] -
PanelInlineDocstringedStage.followup.sizeOf_spec[complete] -
PanelInlineDocstringedStage.initial.sizeOf_spec[complete]
/--
Inline workflow stage docstring used to compare
constructor documentation.
-/
inductive PanelInlineDocstringedStage where
/-- The initial inline stage. -/
| initial
/-- A follow-up inline stage carrying a counter. -/
| followup (_ : Nat)
-
PanelInlineMixedConfig.ctorIdx[complete] -
PanelInlineMixedConfig.noConfusionType[complete] -
PanelInlineMixedFold.ctorIdx[complete] -
PanelInlineMixedFold.noConfusionType[complete] -
PanelInlineMixedState.ctorElimType[complete] -
PanelInlineMixedState.ctorIdx[complete] -
PanelInlineMixedState.noConfusionType[complete] -
PanelInlineMixedConfig[complete] -
PanelInlineMixedConfig.casesOn[complete] -
PanelInlineMixedConfig.enabled[complete] -
PanelInlineMixedConfig.mk[complete] -
PanelInlineMixedConfig.mk.noConfusion[complete] -
PanelInlineMixedConfig.noConfusion[complete] -
PanelInlineMixedConfig.rec[complete] -
PanelInlineMixedConfig.recOn[complete] -
PanelInlineMixedState[complete] -
PanelInlineMixedState.casesOn[complete] -
PanelInlineMixedState.ctorElim[complete] -
PanelInlineMixedState.noConfusion[complete] -
PanelInlineMixedState.ready[complete] -
PanelInlineMixedState.ready.elim[complete] -
PanelInlineMixedState.rec[complete] -
PanelInlineMixedState.recOn[complete] -
PanelInlineMixedState.running[complete] -
PanelInlineMixedState.running.elim[complete] -
PanelInlineMixedState.running.noConfusion[complete] -
PanelInlineMixedFold[complete] -
PanelInlineMixedFold.casesOn[complete] -
PanelInlineMixedFold.empty[complete] -
PanelInlineMixedFold.merge[complete] -
PanelInlineMixedFold.mk[complete] -
PanelInlineMixedFold.mk.noConfusion[complete] -
PanelInlineMixedFold.noConfusion[complete] -
PanelInlineMixedFold.rec[complete] -
PanelInlineMixedFold.recOn[complete] -
PanelInlineMixedConfig.mk.inj[complete] -
PanelInlineMixedConfig.mk.injEq[complete] -
PanelInlineMixedConfig.mk.sizeOf_spec[complete] -
PanelInlineMixedState.ready.sizeOf_spec[complete] -
PanelInlineMixedState.running.inj[complete] -
PanelInlineMixedState.running.injEq[complete] -
PanelInlineMixedState.running.sizeOf_spec[complete]
Inline Lean panel sample mixing documented structures, inductives, and classes.
Lean code for Definition2.28
Associated Lean declarations
-
PanelInlineMixedConfig.ctorIdx[complete]
-
PanelInlineMixedConfig.noConfusionType[complete]
-
PanelInlineMixedFold.ctorIdx[complete]
-
PanelInlineMixedFold.noConfusionType[complete]
-
PanelInlineMixedState.ctorElimType[complete]
-
PanelInlineMixedState.ctorIdx[complete]
-
PanelInlineMixedState.noConfusionType[complete]
-
PanelInlineMixedConfig[complete]
-
PanelInlineMixedConfig.casesOn[complete]
-
PanelInlineMixedConfig.enabled[complete]
-
PanelInlineMixedConfig.mk[complete]
-
PanelInlineMixedConfig.mk.noConfusion[complete]
-
PanelInlineMixedConfig.noConfusion[complete]
-
PanelInlineMixedConfig.rec[complete]
-
PanelInlineMixedConfig.recOn[complete]
-
PanelInlineMixedState[complete]
-
PanelInlineMixedState.casesOn[complete]
-
PanelInlineMixedState.ctorElim[complete]
-
PanelInlineMixedState.noConfusion[complete]
-
PanelInlineMixedState.ready[complete]
-
PanelInlineMixedState.ready.elim[complete]
-
PanelInlineMixedState.rec[complete]
-
PanelInlineMixedState.recOn[complete]
-
PanelInlineMixedState.running[complete]
-
PanelInlineMixedState.running.elim[complete]
-
PanelInlineMixedState.running.noConfusion[complete]
-
PanelInlineMixedFold[complete]
-
PanelInlineMixedFold.casesOn[complete]
-
PanelInlineMixedFold.empty[complete]
-
PanelInlineMixedFold.merge[complete]
-
PanelInlineMixedFold.mk[complete]
-
PanelInlineMixedFold.mk.noConfusion[complete]
-
PanelInlineMixedFold.noConfusion[complete]
-
PanelInlineMixedFold.rec[complete]
-
PanelInlineMixedFold.recOn[complete]
-
PanelInlineMixedConfig.mk.inj[complete]
-
PanelInlineMixedConfig.mk.injEq[complete]
-
PanelInlineMixedConfig.mk.sizeOf_spec[complete]
-
PanelInlineMixedState.ready.sizeOf_spec[complete]
-
PanelInlineMixedState.running.inj[complete]
-
PanelInlineMixedState.running.injEq[complete]
-
PanelInlineMixedState.running.sizeOf_spec[complete]
-
PanelInlineMixedConfig.ctorIdx[complete] -
PanelInlineMixedConfig.noConfusionType[complete] -
PanelInlineMixedFold.ctorIdx[complete] -
PanelInlineMixedFold.noConfusionType[complete] -
PanelInlineMixedState.ctorElimType[complete] -
PanelInlineMixedState.ctorIdx[complete] -
PanelInlineMixedState.noConfusionType[complete] -
PanelInlineMixedConfig[complete] -
PanelInlineMixedConfig.casesOn[complete] -
PanelInlineMixedConfig.enabled[complete] -
PanelInlineMixedConfig.mk[complete] -
PanelInlineMixedConfig.mk.noConfusion[complete] -
PanelInlineMixedConfig.noConfusion[complete] -
PanelInlineMixedConfig.rec[complete] -
PanelInlineMixedConfig.recOn[complete] -
PanelInlineMixedState[complete] -
PanelInlineMixedState.casesOn[complete] -
PanelInlineMixedState.ctorElim[complete] -
PanelInlineMixedState.noConfusion[complete] -
PanelInlineMixedState.ready[complete] -
PanelInlineMixedState.ready.elim[complete] -
PanelInlineMixedState.rec[complete] -
PanelInlineMixedState.recOn[complete] -
PanelInlineMixedState.running[complete] -
PanelInlineMixedState.running.elim[complete] -
PanelInlineMixedState.running.noConfusion[complete] -
PanelInlineMixedFold[complete] -
PanelInlineMixedFold.casesOn[complete] -
PanelInlineMixedFold.empty[complete] -
PanelInlineMixedFold.merge[complete] -
PanelInlineMixedFold.mk[complete] -
PanelInlineMixedFold.mk.noConfusion[complete] -
PanelInlineMixedFold.noConfusion[complete] -
PanelInlineMixedFold.rec[complete] -
PanelInlineMixedFold.recOn[complete] -
PanelInlineMixedConfig.mk.inj[complete] -
PanelInlineMixedConfig.mk.injEq[complete] -
PanelInlineMixedConfig.mk.sizeOf_spec[complete] -
PanelInlineMixedState.ready.sizeOf_spec[complete] -
PanelInlineMixedState.running.inj[complete] -
PanelInlineMixedState.running.injEq[complete] -
PanelInlineMixedState.running.sizeOf_spec[complete]
/-- Inline mixed configuration docstring. -/
structure PanelInlineMixedConfig where
/-- Whether the preview branch is enabled. -/
enabled : Bool
/-- Inline mixed state docstring. -/
inductive PanelInlineMixedState where
/-- The ready state. -/
| ready
/-- The running state with a step count. -/
| running (_ : Nat)
/-- Inline mixed fold class docstring. -/
class PanelInlineMixedFold (α : Type) where
/-- The empty inline value. -/
empty : α
/-- Merge two inline values. -/
merge : α -> α -> α
- No associated Lean code or declarations.
Statement without associated Lean code.