Questions tagged [lean]

Lean is an open source theorem prover being developed at Microsoft Research, with a monolothic standard library developed collaboratively. The Lean Theorem Prover aims to bridge the gap between interactive and automated theorem proving. There are two main versions available; Lean 3 and Lean 4, with similar designs but different syntax.

Resources:

169 questions
0
votes
1 answer

Why both the typeclass and implicit argument mechanism?

So we can have explicit arguments, denoted by (). We can also have implicit arguments, denoted by {}. So far so good. However, why do we also need the [] notation for type classes specifically? What is the difference between the following…
ScarletAmaranth
  • 5,065
  • 2
  • 23
  • 34
0
votes
1 answer

In Lean, is it possible to use decidable_linear_order with a user defined equality relation?

Lean comes with a decidable_linear_order typeclass containing useful lemmas about an ordering and its relation to equality, such as: lemma eq_or_lt_of_not_lt [decidable_linear_order α] {a b : α} (h : ¬ a < b) : a = b ∨ b < a The equalities in these…
LogicChains
  • 4,332
  • 2
  • 18
  • 27
0
votes
1 answer

Attaching an attribute to a definition causes syntax errors

I want to attribute a definition reducible. I am pretty sure I got the syntax right, as I copied it verbatim from the tutorial (p. 118). definition pr1 [reducible] (A : Type) (a b : A) : A := a attribute pr1 [reducible] Neither combination of the…
Sebastian Graf
  • 3,602
  • 3
  • 27
  • 38
-1
votes
1 answer

Prove (p → ¬ q) → ¬ (p ∧ q) in Lean4

I get as far as this theorem problem_2 : (p → ¬ q) → ¬ (p ∧ q) := by intro hp intro hpw which gets me to ⊢ False
1 2 3
11
12