Skip to content

Instantly share code, notes, and snippets.

@optician
Created March 6, 2019 03:55
Show Gist options
  • Save optician/35abe35aaebfdc3d63bad38382885ed4 to your computer and use it in GitHub Desktop.
Save optician/35abe35aaebfdc3d63bad38382885ed4 to your computer and use it in GitHub Desktop.
basics, 3 stars task
Theorem andb_true_id :
forall a : bool, a = andb true a.
Proof.
intros []; reflexivity.
Qed.
Theorem orb_false_id :
forall a : bool, a = orb false a.
Proof.
intros []; reflexivity.
Qed.
Theorem andb_eq_orb :
forall (b c : bool),
(andb b c = orb b c) ->
b = c.
Proof.
intros [] c H.
- rewrite andb_true_id. rewrite H. reflexivity.
- rewrite orb_false_id. rewrite <- H. reflexivity.
Qed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment