import MyNat.Definition
namespace MyNat
open MyNat
Advanced Proposition world
Level 1: the constructor
tactic.
The logical symbol ∧
means "and". If P
and Q
are propositions, then P ∧ Q
is the proposition
"P
and Q
". If your goal is P ∧ Q
then you can make progress with the constructor
tactic.,
which turns one goal ⊢ P ∧ Q
into two goals, namely ⊢ P
and ⊢ Q
. In the level below, after a
constructor
, you can finish off the two new sub-goals with the exact
tactic since both p
and
q
provide exactly what we need. You could also use the assumption
tactic.
Lemma
If P
and Q
are true, then P ∧ Q
is true.
example (example: ∀ (P Q : Prop), P → Q → P ∧ QPP: PropQ :Q: PropProp) (Prop: Typep :p: PP) (P: Propq :q: QQ) :Q: PropP ∧P: PropQ :=Q: PropP, Q: Prop
p: P
q: QP ∧ QP, Q: Prop
p: P
q: Q
leftPP, Q: Prop
p: P
q: QQP, Q: Prop
p: P
q: Q
rightQGoals accomplished! 🐙
Next up Level 2