coq: remove type_unit & type_num

This commit is contained in:
Michael Sippel 2024-08-21 16:10:15 +02:00
parent 42ae93f2d7
commit 0caf3ff514
Signed by: senvas
GPG key ID: 060F22F65102F95C
2 changed files with 2 additions and 17 deletions

View file

@ -224,9 +224,7 @@ Qed.
(** "flat" types do not contain ladders $\label{coq:type-flat}$ *) (** "flat" types do not contain ladders $\label{coq:type-flat}$ *)
Inductive type_is_flat : type_term -> Prop := Inductive type_is_flat : type_term -> Prop :=
| FlatUnit : (type_is_flat type_unit)
| FlatVar : forall x, (type_is_flat (type_var x)) | FlatVar : forall x, (type_is_flat (type_var x))
| FlatNum : forall x, (type_is_flat (type_num x))
| FlatId : forall x, (type_is_flat (type_id x)) | FlatId : forall x, (type_is_flat (type_id x))
| FlatApp : forall x y, | FlatApp : forall x y,
(type_is_flat x) -> (type_is_flat x) ->
@ -295,22 +293,11 @@ Proof.
intros. intros.
destruct t. destruct t.
exists type_unit.
split. apply TEq_Refl.
apply LNF.
admit.
exists (type_id s). exists (type_id s).
split. apply TEq_Refl. split. apply TEq_Refl.
apply LNF. apply LNF.
admit. admit.
admit. admit.
exists (type_num n).
split. apply TEq_Refl.
apply LNF.
admit.
admit. admit.
exists (type_univ s t). exists (type_univ s t).
@ -342,11 +329,11 @@ Admitted.
*) *)
Example example_flat_type : Example example_flat_type :
(type_is_flat (type_spec (type_id "PosInt") (type_num 10))). (type_is_flat (type_spec (type_id "PosInt") (type_id "10"))).
Proof. Proof.
apply FlatApp. apply FlatApp.
apply FlatId. apply FlatId.
apply FlatNum. apply FlatId.
Qed. Qed.
Example example_lnf_type : Example example_lnf_type :

View file

@ -8,10 +8,8 @@ Module Terms.
(* types *) (* types *)
Inductive type_term : Type := Inductive type_term : Type :=
| type_unit : type_term
| type_id : string -> type_term | type_id : string -> type_term
| type_var : string -> type_term | type_var : string -> type_term
| type_num : nat -> type_term
| type_fun : type_term -> type_term -> type_term | type_fun : type_term -> type_term -> type_term
| type_univ : string -> type_term -> type_term | type_univ : string -> type_term -> type_term
| type_spec : type_term -> type_term -> type_term | type_spec : type_term -> type_term -> type_term