Created
May 19, 2022 12:32
-
-
Save gernst/b069ca7cf9c8606be5819a87599a2cf8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* using tactics *) | |
lemma "A ∧ B ⟶ B ∧ A" | |
apply (rule impI) (* A ∧ B ⟹ B ∧ A *) | |
apply (rule conjI) (* 1: A ∧ B ⟹ B and 2: A ∧ B ⟹ A *) | |
(* goal 1 *) | |
apply (erule conjE) (* A ⟹ B ⟹ B *) | |
apply assumption | |
(* goal 2 *) | |
apply (erule conjE) (* A ⟹ B ⟹ A *) | |
apply assumption | |
done | |
(* using Isar *) | |
lemma "A ∧ B ⟶ B ∧ A" | |
proof (rule impI) | |
assume 1: "A ∧ B" | |
show "B ∧ A" | |
proof | |
from 1 show "A" | |
by (rule conjE) | |
from 1 show "B" | |
by (rule conjE) | |
qed | |
qed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment