Skip to content
Snippets Groups Projects
Commit ef89aa7b authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Put the type class logical connectives in Prop.

Before, we often had to insert awkward casts when using them. Also,
the generality of also having them on Type, is probably not useful.
parent 5c857c01
No related branches found
No related tags found
No related merge requests found
...@@ -28,20 +28,20 @@ Unset Primitive Projections. ...@@ -28,20 +28,20 @@ Unset Primitive Projections.
(* The [Or] class is useful for efficiency: instead of having two instances (* The [Or] class is useful for efficiency: instead of having two instances
[P → Q1 → R] and [P → Q2 → R] we could have one instance [P → Or Q1 Q2 → R], [P → Q1 → R] and [P → Q2 → R] we could have one instance [P → Or Q1 Q2 → R],
which avoids the need to derive [P] twice. *) which avoids the need to derive [P] twice. *)
Inductive TCOr (P1 P2 : Type) := Inductive TCOr (P1 P2 : Prop) : Prop :=
| TCOr_l : P1 TCOr P1 P2 | TCOr_l : P1 TCOr P1 P2
| TCOr_r : P2 TCOr P1 P2. | TCOr_r : P2 TCOr P1 P2.
Existing Class TCOr. Existing Class TCOr.
Existing Instance TCOr_l | 9. Existing Instance TCOr_l | 9.
Existing Instance TCOr_r | 10. Existing Instance TCOr_r | 10.
Inductive TCAnd (P1 P2 : Type) := TCAnd_intro : P1 P2 TCAnd P1 P2. Inductive TCAnd (P1 P2 : Prop) : Prop := TCAnd_intro : P1 P2 TCAnd P1 P2.
Existing Class TCAnd. Existing Class TCAnd.
Existing Instance TCAnd_intro. Existing Instance TCAnd_intro.
Inductive TCUnit := TCUnit_intro : TCUnit. Inductive TCTrue : Prop := TCTrue_intro : TCTrue.
Existing Class TCUnit. Existing Class TCTrue.
Existing Instance TCUnit_intro. Existing Instance TCTrue_intro.
(** Throughout this development we use [C_scope] for all general purpose (** Throughout this development we use [C_scope] for all general purpose
notations that do not belong to a more specific scope. *) notations that do not belong to a more specific scope. *)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment