diff options
Diffstat (limited to 'test-suite/ideal-features/Case3.v')
-rw-r--r-- | test-suite/ideal-features/Case3.v | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/test-suite/ideal-features/Case3.v b/test-suite/ideal-features/Case3.v index e9dba1e3..de7784ae 100644 --- a/test-suite/ideal-features/Case3.v +++ b/test-suite/ideal-features/Case3.v @@ -1,28 +1,29 @@ -Inductive Le : nat->nat->Set := - LeO: (n:nat)(Le O n) -| LeS: (n,m:nat)(Le n m) -> (Le (S n) (S m)). +Inductive Le : nat -> nat -> Set := + | LeO : forall n : nat, Le 0 n + | LeS : forall n m : nat, Le n m -> Le (S n) (S m). -Parameter iguales : (n,m:nat)(h:(Le n m))Prop . +Parameter discr_l : forall n : nat, S n <> 0. -Type <[n,m:nat][h:(Le n m)]Prop>Cases (LeO O) of - (LeO O) => True - | (LeS (S x) (S y) H) => (iguales (S x) (S y) H) - | _ => False end. +Type + (fun n : nat => + match n return (n = 0 \/ n <> 0) with + | O => or_introl (0 <> 0) (refl_equal 0) + | S O => or_intror (1 = 0) (discr_l 0) + | S (S x) => or_intror (S (S x) = 0) (discr_l (S x)) + end). +Parameter iguales : forall (n m : nat) (h : Le n m), Prop. -Type <[n,m:nat][h:(Le n m)]Prop>Cases (LeO O) of - (LeO O) => True - | (LeS (S x) O H) => (iguales (S x) O H) - | _ => False end. - -Parameter discr_l : (n:nat) ~((S n)=O). - -Type -[n:nat] - <[n:nat]n=O\/~n=O>Cases n of - O => (or_introl ? ~O=O (refl_equal ? O)) - | (S O) => (or_intror (S O)=O ? (discr_l O)) - | (S (S x)) => (or_intror (S (S x))=O ? (discr_l (S x))) - +Type + match LeO 0 as h in (Le n m) return Prop with + | LeO O => True + | LeS (S x) (S y) H => iguales (S x) (S y) H + | _ => False end. +Type + match LeO 0 as h in (Le n m) return Prop with + | LeO O => True + | LeS (S x) O H => iguales (S x) 0 H + | _ => False + end. |