For instance, we want succ n = n + 1
for natural numbers. How do we define +
and check that the former equality holds?
We expect the equality relation on a set
A binary relation satisfying these properties is called an equivalence relation.
Given a set
This does not mean that they represent true statements!
It also does not mean that we can somehow evaluate their "truth value" by applying a "know-it-all" function.
The question is whether we can construct a proof of these propositions.
Let
Let
inductive And (P Q : Prop) : Prop
| intro (p : P) (q : Q) : And P Q
Let
Propositions behave similarly as sets.
Just like for sets, there is an empty proposition called ⊥
(bottom). It is defined by the absence of way to construct proofs of it.
inductive False : Prop
Nat.succ
and proof that, ∀ n : ℕ, 0 ≠succ n
.Image credits: Assia Mahboubi.
Let
inductive Or (P Q : Prop) : Prop
| inl (p : P) : Or P Q
| inr (q : Q) : Or P Q
A tautology is a proposition which is built up from older ones and which has a proof regardless of whether the old ones do. For instance:
Here,
inductive Exists (P : X → Prop) : Prop
| intro (x : X) (p : P x) : Exists P
Proofs of universal statements are somewhat trickier.
Mathematical logic is not a pre-requisite of our language. Instead, logical connectives and quantifiers are introduced in the same way as sets.
The equivalences in
In
Let
As an example, think of the statement that, given an ideal