CoInductive bisim_ :
∀ {
A}
, Tri A → Tri A → Prop ≔
bisim_constr :
∀ {
A} {
t₁ t₂ :
Tri A}, top t₁ = top t₂ → bisim_ (
rest t₁) (
rest t₂)
→ bisim_ t₁ t₂.
Definition bisim :
∀ {
A}
, Tri A → Tri A → Prop ≔ @
bisim_.
Infix "∼" ≔
bisim (
at level 70).
Lemma bisim_top :
∀ {
A} {
s₁ s₂ :
Tri A}, s₁ ∼ s₂ → top s₁ = top s₂.
Show proof.
intros. now destruct H.
Lemma bisim_rest :
∀ {
A} {
s₁ s₂ :
Tri A}, s₁ ∼ s₂ → rest s₁ ∼ rest s₂.
Show proof.
intros. now destruct H.
Notation "∼-top" ≔
bisim_top (
only parsing).
Notation "∼-rest" ≔
bisim_rest (
only parsing).
Lemma bisim_intro :
∀ (R :
∀ {
X}
, Tri X → Tri X → Prop)
(
R_top :
∀ {
A} {
s₁ s₂ :
Tri A}, R s₁ s₂ → top s₁ = top s₂)
(
R_rest :
∀ {
A} {
s₁ s₂ :
Tri A}, R s₁ s₂ → R (
rest s₁) (
rest s₂)
),
∀ {
A} {
s₁ s₂ :
Tri A}, R s₁ s₂ → s₁ ∼ s₂.
Show proof.
cofix Hc; constructor; intros.
- now apply R_top.
- eapply Hc; eauto. now apply R_rest.
End TriInstance.
Module Terminality (
TE :
Typ) ≔
TE <+
TriInstance <+
TriMatTerminal.