book/TPiL/InteractingWithLean.lean

GitHub source file

Explanation legend Lean4 Domain Explanation Language (L4DEL)

L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.

L4DEL
Lean4 Domain Explanation Language

Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.

Project sources: Pinned Theorem Proving in Lean documentation, Pinned Theorem Proving in Lean 4 book index

84 declarations, 3 contain sorry, 0 declared as axioms

Imports (2)
  1. def x sorry line 59 source
  2. def double line 150 source

    Distinct definitions of this name: book/TPiL/DependentTypeTheory.lean:547 (different declaration text). Qualify references as double@path.

  3. theorem t1 line 158 source

    Distinct definitions of this name: book/TPiL/PropositionsAndProofs.lean:224 (different declaration text). Qualify references as t1@path.

  4. theorem t2 line 165 source

    Distinct definitions of this name: book/TPiL/PropositionsAndProofs.lean:319 (different declaration text). Qualify references as t2@path.

  5. def Foo.bar line 193 source

    Distinct definitions of this name: book/TPiL/PropositionsAndProofs.lean:611 (different declaration text). Qualify references as Foo.bar@path.

  6. def Foo.bar line 206 source

    Distinct definitions of this name: book/TPiL/PropositionsAndProofs.lean:611 (different declaration text). Qualify references as Foo.bar@path.

  7. def Foo.bar line 213 source

    Distinct definitions of this name: book/TPiL/PropositionsAndProofs.lean:611 (different declaration text). Qualify references as Foo.bar@path.

  8. def String.add line 225 source
  9. def Bool.add line 228 source
  10. def add line 231 source

    Distinct definitions of this name: book/TPiL/DependentTypeTheory.lean:600 (different declaration text), book/TPiL/InductionAndRecursion.lean:505 (different declaration text). Qualify references as add@path.

  11. def Foo.bar line 255 source

    Distinct definitions of this name: book/TPiL/PropositionsAndProofs.lean:611 (different declaration text). Qualify references as Foo.bar@path.

  12. def isPrefix line 339 source
  13. theorem List.isPrefix_self line 342 source
  14. example (example at line 345) line 345 source
  15. def isPrefix line 354 source
  16. theorem List.isPrefix_self line 357 source

    Source comment

    ----
    theorem List.isPrefix_self (as : List α) : isPrefix as as :=
    …

    Mentions: as, α, isPrefix

  17. def isPrefix line 368 source
  18. theorem List.isPrefix_self line 373 source
  19. example (example at line 378) line 378 source
  20. example (example at line 385) line 385 source
  21. def isPrefix line 396 source
  22. instance (instance at line 399) line 399 source
  23. theorem List.isPrefix_self line 402 source
  24. def isPrefix line 411 source
  25. abbrev instLe line 414 source

    Source comment

    ----
    abbrev instLe : LE (List α) :=
    …

    Mentions: α

  26. example (example at line 420) line 420 source
  27. example (example at line 432) line 432 source
  28. def f line 468 source

    Distinct definitions of this name: book/TPiL/AxiomsComputation.lean:340 (different declaration text), book/TPiL/DependentTypeTheory.lean:416 (different declaration text), book/TPiL/InductionAndRecursion.lean:833 (different declaration text), book/TPiL/Tactics.lean:1457 (different declaration text). Qualify references as f@path.

  29. example (example at line 470) line 470 source

    Source comment

    Equivalent:
    example := f 7
  30. example (example at line 471) line 471 source
  31. def f line 482 source

    Distinct definitions of this name: book/TPiL/AxiomsComputation.lean:340 (different declaration text), book/TPiL/DependentTypeTheory.lean:416 (different declaration text), book/TPiL/InductionAndRecursion.lean:833 (different declaration text), book/TPiL/Tactics.lean:1457 (different declaration text). Qualify references as f@path.

  32. example (example at line 484) line 484 source

    Source comment

    Just f 7
    example := f 7
  33. example (example at line 486) line 486 source

    Source comment

    These are equivalent:
    example := @f 7 _ 3
  34. example (example at line 487) line 487 source
  35. def f' Alternative syntax: line 489 source

    Source comment

    Alternative syntax:
    def f' (x : Nat) ⦃y : Nat⦄ (z : Nat) : Nat := x + y + z
    …

    Mentions: x

  36. def reflexive line 507 source
  37. def symmetric line 510 source
  38. def transitive line 513 source
  39. def Euclidean line 516 source
  40. theorem th1 line 519 source
  41. theorem th2 line 526 source
  42. theorem th3 line 533 source
  43. def reflexive line 553 source
  44. def symmetric line 556 source
  45. def transitive line 559 source
  46. def Euclidean line 562 source
  47. theorem th1 line 565 source
  48. theorem th2 line 572 source
  49. theorem th3 line 579 source
  50. def wobble sorry line 679 source
  51. def wobble sorry line 687 source
  52. def foo a user-defined function line 784 source

    Source comment

    a user-defined function

    Distinct definitions of this name: book/TPiL/DependentTypeTheory.lean:779 (different declaration text), book/TPiL/InductionAndRecursion.lean:115 (different declaration text). Qualify references as foo@path.

    def foo {α : Type u} (x : α) : α := x
    …

    Mentions: α, x

  53. example {lit}`Nat`.(example at line 935) line 935 source
  54. def {lit}`Nat`.compose line 996 source
  55. def {lit}`Nat`.compose line 1006 source
  56. def {lit}`Nat`.compose line 1025 source
  57. def {lit}`Nat`.compose line 1067 source
  58. instance {lit}`Nat`.(instance at line 1091) line 1091 source

    Source comment

    ----
    instance : Monad (ReaderT ρ m) where
    …

    Mentions: m

  59. def {lit}`Nat`.Ex2.id1 line 1105 source

    Source comment

    ----
    def id1 : {α : Type} → α → α :=
    …

    Mentions: α

  60. def {lit}`Nat`.Ex2.listId line 1108 source
  61. def {lit}`Nat`.Ex2.id2 In this example, implicit lambda introduction has been disabled because we use @ before {kw}fun line 1113 source

    Source comment

    In this example, implicit lambda introduction has been disabled because we use `@` before {kw}`fun`
    def id2 : {α : Type} → α → α :=
    …

    Mentions: α

  62. def {lit}`Nat`.Ex2.id3 line 1116 source
  63. def {lit}`Nat`.Ex2.id4 line 1119 source
  64. def {lit}`Nat`.Ex2.id5 In this example, implicit lambda introduction has been disabled because we used the binder annotation {...} line 1124 source

    Source comment

    In this example, implicit lambda introduction has been disabled because we used the binder annotation `{...}`
    def id5 : {α : Type} → α → α :=
    …

    Mentions: α

  65. def {lit}`Nat`.Ex3.f line 1150 source
  66. def {lit}`Nat`.sum line 1180 source
  67. example {lit}`Nat`.(example at line 1186) line 1186 source
  68. def {lit}`Nat`.f line 1196 source
  69. example {lit}`Nat`.(example at line 1199) line 1199 source
  70. example {lit}`Nat`.(example at line 1201) line 1201 source
  71. example {lit}`Nat`.(example at line 1203) line 1203 source
  72. example {lit}`Nat`.(example at line 1205) line 1205 source
  73. example {lit}`Nat`.(example at line 1207) line 1207 source
  74. example {lit}`Nat`.(example at line 1209) line 1209 source
  75. def {lit}`Nat`.g line 1211 source
  76. example {lit}`Nat`.(example at line 1218) line 1218 source
  77. example {lit}`Nat`.(example at line 1220) line 1220 source
  78. example {lit}`Nat`.(example at line 1222) line 1222 source
  79. example {lit}`Nat`.(example at line 1224) line 1224 source
  80. example {lit}`Nat`.(example at line 1226) line 1226 source
  81. inductive {lit}`Nat`.Term line 1233 source
  82. def {lit}`Nat`.getBinderName line 1239 source
  83. def {lit}`Nat`.getBinderType line 1243 source
  84. example {lit}`Nat`.(example at line 1252) line 1252 source