Built with Alectryon, running Coq+SerAPI v8.10.0+0.7.0. Coq sources are in this panel; goals and messages will appear in the other. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑ Ctrl+↓ to navigate, Ctrl+🖱️ to focus.
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) (* v * INRIA, CNRS and contributors - Copyright 1999-2018 *) (* <O___,, * (see CREDITS file for the list of authors) *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (* * (see LICENSE file for the text of the license) *) (************************************************************************) Require Import Decidable PeanoNat. Require Eqdep_dec. Local Open Scope nat_scope. Implicit Types m n x y : nat.n:nat{m : nat | S m = n} + {0 = n}n:nat{m : nat | S m = n} + {0 = n}{m : nat | S m = 0} + {0 = 0}n:natIHn:{m : nat | S m = n} + {0 = n}{m : nat | S m = S n} + {0 = S n}now right.{m : nat | S m = 0} + {0 = 0}left; exists n; auto. Defined. Notation eq_nat_dec := Nat.eq_dec (only parsing). Hint Resolve O_or_S eq_nat_dec: arith.n:natIHn:{m : nat | S m = n} + {0 = n}{m : nat | S m = S n} + {0 = S n}n, m:natdecidable (n = m)elim (Nat.eq_dec n m); [left|right]; trivial. Defined. Register dec_eq_nat as num.nat.eq_dec. Definition UIP_nat:= Eqdep_dec.UIP_dec Nat.eq_dec. Import EqNotations.n, m:natdecidable (n = m)forall (m n : nat) (le_mn1 le_mn2 : m <= n), le_mn1 = le_mn2forall (m n : nat) (le_mn1 le_mn2 : m <= n), le_mn1 = le_mn2m, n:natforall le_mn1 le_mn2 : m <= n, le_mn1 = le_mn2m, n:natS n = S n -> forall le_mn1 le_mn2 : m <= n, le_mn1 = le_mn2m, n:natforall n0 : nat, S n = S n0 -> forall le_mn1 le_mn2 : m <= n0, le_mn1 = le_mn2m, n, n0:natIHn0:forall n1 : nat, n0 = S n1 -> forall le_mn1 le_mn2 : m <= n1, le_mn1 = le_mn2forall n1 : nat, S n0 = S n1 -> forall le_mn1 le_mn2 : m <= n1, le_mn1 = le_mn2m, n0:natIHn0:forall n : nat, n0 = S n -> forall le_mn0 le_mn3 : m <= n, le_mn0 = le_mn3le_mn1, le_mn2:m <= n0le_mn1 = le_mn2m, n0:natIHn0:forall n : nat, n0 = S n -> forall le_mn0 le_mn3 : m <= n, le_mn0 = le_mn3le_mn1, le_mn2:m <= n0def_n2:=eq_refl:n0 = n0le_mn1 = eq_ind n0 (le m) le_mn2 n0 def_n2m, n0:natIHn0:forall n : nat, n0 = S n -> forall le_mn0 le_mn3 : m <= n, le_mn0 = le_mn3le_mn1, le_mn2:m <= n0def_n2:=eq_refl:n0 = n0eq_ind n0 (le m) le_mn2 n0 def_n2 = le_mn2m, n0:natIHn0:forall n : nat, n0 = S n -> forall le_mn0 le_mn3 : m <= n, le_mn0 = le_mn3le_mn1, le_mn2:m <= n0def_n2:=eq_refl:n0 = n0le_mn1 = eq_ind n0 (le m) le_mn2 n0 def_n2m, n0:natIHn0:forall n : nat, n0 = S n -> forall le_mn1 le_mn2 : m <= n, le_mn1 = le_mn2def_n2:=eq_refl:n0 = n0forall (le_mn1 le_mn2 : m <= n0) (def_n0 : n0 = n0), le_mn1 = eq_ind n0 (le m) le_mn2 n0 def_n0m, n0:natIHn0:forall n : nat, n0 = S n -> forall le_mn0 le_mn2 : m <= n, le_mn0 = le_mn2def_n2:=eq_refl:n0 = n0n1:natle_mn1:m <= n1forall (le_mn2 : m <= n0) (def_n0 : n0 = n1), le_mn1 = eq_ind n0 (le m) le_mn2 n1 def_n0m:natIHn0:forall n : nat, m = S n -> forall le_mn1 le_mn2 : m <= n, le_mn1 = le_mn2def_n2:=eq_refl:m = mforall def_n0 : m = m, le_n m = eq_ind m (le m) (le_n m) m def_n0m, m0:natIHn0:forall n : nat, S m0 = S n -> forall le_mn1 le_mn0 : m <= n, le_mn1 = le_mn0def_n2:=eq_refl:S m0 = S m0le_mn2:m <= m0forall def_n0 : S m0 = m, le_n m = eq_ind (S m0) (le m) (le_S m m0 le_mn2) m def_n0m:natIHn0:forall n : nat, m = S n -> forall le_mn0 le_mn2 : m <= n, le_mn0 = le_mn2def_n2:=eq_refl:m = mm0:natle_mn1:m <= m0forall def_n0 : m = S m0, le_S m m0 le_mn1 = eq_ind m (le m) (le_n m) (S m0) def_n0m, m1:natIHn0:forall n : nat, S m1 = S n -> forall le_mn0 le_mn3 : m <= n, le_mn0 = le_mn3def_n2:=eq_refl:S m1 = S m1m0:natle_mn1:m <= m0le_mn2:m <= m1forall def_n0 : S m1 = S m0, le_S m m0 le_mn1 = eq_ind (S m1) (le m) (le_S m m1 le_mn2) (S m0) def_n0now intros def_n0; rewrite (UIP_nat _ _ def_n0 eq_refl).m:natIHn0:forall n : nat, m = S n -> forall le_mn1 le_mn2 : m <= n, le_mn1 = le_mn2def_n2:=eq_refl:m = mforall def_n0 : m = m, le_n m = eq_ind m (le m) (le_n m) m def_n0m, m0:natIHn0:forall n : nat, S m0 = S n -> forall le_mn1 le_mn0 : m <= n, le_mn1 = le_mn0def_n2:=eq_refl:S m0 = S m0le_mn2:m <= m0forall def_n0 : S m0 = m, le_n m = eq_ind (S m0) (le m) (le_S m m0 le_mn2) m def_n0now destruct (Nat.nle_succ_diag_l _ le_mn0).m, m0:natIHn0:forall n : nat, S m0 = S n -> forall le_mn1 le_mn3 : m <= n, le_mn1 = le_mn3def_n2:=eq_refl:S m0 = S m0le_mn2:m <= m0def_n0:S m0 = mle_mn0:S m0 <= m0le_n (S m0) = eq_ind (S m0) (le (S m0)) (le_S (S m0) m0 le_mn0) (S m0) eq_reflm:natIHn0:forall n : nat, m = S n -> forall le_mn0 le_mn2 : m <= n, le_mn0 = le_mn2def_n2:=eq_refl:m = mm0:natle_mn1:m <= m0forall def_n0 : m = S m0, le_S m m0 le_mn1 = eq_ind m (le m) (le_n m) (S m0) def_n0now destruct (Nat.nle_succ_diag_l _ le_mn0).m:natIHn0:forall n : nat, m = S n -> forall le_mn2 le_mn3 : m <= n, le_mn2 = le_mn3def_n2:=eq_refl:m = mm0:natle_mn1:m <= m0def_n0:m = S m0le_mn0:S m0 <= m0le_S (S m0) m0 le_mn0 = eq_ind (S m0) (le (S m0)) (le_n (S m0)) (S m0) eq_reflm, m1:natIHn0:forall n : nat, S m1 = S n -> forall le_mn0 le_mn3 : m <= n, le_mn0 = le_mn3def_n2:=eq_refl:S m1 = S m1m0:natle_mn1:m <= m0le_mn2:m <= m1forall def_n0 : S m1 = S m0, le_S m m0 le_mn1 = eq_ind (S m1) (le m) (le_S m m1 le_mn2) (S m0) def_n0m, m1:natIHn0:forall n : nat, S m1 = S n -> forall le_mn0 le_mn3 : m <= n, le_mn0 = le_mn3def_n2:=eq_refl:S m1 = S m1m0:natle_mn1:m <= m0le_mn2:m <= m1def_n0:S m1 = S m0le_S m m0 le_mn1 = eq_ind (S m1) (le m) (le_S m m1 le_mn2) (S m0) def_n0m, m0:natdef_n2:=eq_refl:S m0 = S m0IHn0:forall n : nat, S m0 = S n -> forall le_mn0 le_mn3 : m <= n, le_mn0 = le_mn3le_mn1:m <= m0def_n0:S m0 = S m0le_mn2:m <= m0le_S m m0 le_mn1 = eq_ind (S m0) (le m) (le_S m m0 le_mn2) (S m0) def_n0m, m0:natdef_n2:=eq_refl:S m0 = S m0IHn0:forall n : nat, S m0 = S n -> forall le_mn0 le_mn3 : m <= n, le_mn0 = le_mn3le_mn1:m <= m0def_n0:S m0 = S m0le_mn2:m <= m0le_S m m0 le_mn1 = le_S m m0 le_mn2m, m0:natdef_n2:=eq_refl:S m0 = S m0IHn0:forall n : nat, S m0 = S n -> forall le_mn0 le_mn3 : m <= n, le_mn0 = le_mn3le_mn1:m <= m0def_n0:S m0 = S m0le_mn2:m <= m0le_mn1 = le_mn2m, m0:natdef_n2:=eq_refl:S m0 = S m0IHn0:forall n : nat, S m0 = S n -> forall le_mn0 le_mn3 : m <= n, le_mn0 = le_mn3le_mn1:m <= m0def_n0:S m0 = S m0le_mn2:m <= m0H:le_mn1 = le_mn2le_S m m0 le_mn1 = le_S m m0 le_mn2now rewrite H. Qed.m, m0:natdef_n2:=eq_refl:S m0 = S m0IHn0:forall n : nat, S m0 = S n -> forall le_mn0 le_mn3 : m <= n, le_mn0 = le_mn3le_mn1:m <= m0def_n0:S m0 = S m0le_mn2:m <= m0H:le_mn1 = le_mn2le_S m m0 le_mn1 = le_S m m0 le_mn2
For compatibility
Require Import Le Lt.