Skip to content

Instantly share code, notes, and snippets.

@thomasdziedzic
Created October 16, 2022 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomasdziedzic/3e59c6f787cdffc0b9e3554ba3c43395 to your computer and use it in GitHub Desktop.
Save thomasdziedzic/3e59c6f787cdffc0b9e3554ba3c43395 to your computer and use it in GitHub Desktop.
stuck with chomp10s
Require Import Coq.PArith.BinPos.
Require Import Coq.NArith.BinNat.
Open Scope positive_scope.
Open Scope N_scope.
Fixpoint chomp10s (p : positive) : N :=
match p with
| p'~1~0 => chomp10s p'
| 1~0 => N0
| _ => Npos p
end.
Definition ends_with_10 (n : N) : Prop :=
match n with
| N0 => False
| Npos p =>
match p with
| p'~1~0 => True
| 1~0 => True
| _ => False
end
end.
Theorem chomp10s_correct : forall p : positive, ~ ends_with_10 (chomp10s p).
Proof.
unfold not.
induction p.
- contradiction.
- intros.
Abort.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment