oadt.lang_oadt.kind
Properties
M / \ P O \ / A
#[global]
Instance kind_eq : EqDecision kind.
Proof.
solve_decision.
Defined.
#[global]
Instance kind_join : Join kind :=
fun κ1 κ2 =>
match κ1, κ2 with
| KAny, κ | κ, KAny => κ
| KPublic, KObliv | KObliv, KPublic => KMixed
| KMixed, _ | _, KMixed => KMixed
| κ, _ => κ
end.
#[global]
Instance kind_le : SqSubsetEq kind :=
fun κ1 κ2 => κ2 = (κ1 ⊔ κ2).
#[global]
Instance kind_top : Top kind := KMixed.
#[global]
Instance kind_bot : Bottom kind := KAny.
Instance kind_eq : EqDecision kind.
Proof.
solve_decision.
Defined.
#[global]
Instance kind_join : Join kind :=
fun κ1 κ2 =>
match κ1, κ2 with
| KAny, κ | κ, KAny => κ
| KPublic, KObliv | KObliv, KPublic => KMixed
| KMixed, _ | _, KMixed => KMixed
| κ, _ => κ
end.
#[global]
Instance kind_le : SqSubsetEq kind :=
fun κ1 κ2 => κ2 = (κ1 ⊔ κ2).
#[global]
Instance kind_top : Top kind := KMixed.
#[global]
Instance kind_bot : Bottom kind := KAny.
kind forms a SemiLattice.
#[global]
Instance kind_semilattice : SemiLattice kind.
Proof.
split; try reflexivity; repeat intros []; auto.
Qed.
Instance kind_semilattice : SemiLattice kind.
Proof.
split; try reflexivity; repeat intros []; auto.
Qed.
Module notations.
Notation "*@A" := (KAny) (in custom oadt at level 0).
Notation "*@P" := (KPublic) (in custom oadt at level 0).
Notation "*@O" := (KObliv) (in custom oadt at level 0).
Notation "*@M" := (KMixed) (in custom oadt at level 0).
Infix "⊔" := (⊔) (in custom oadt at level 50).
End notations.
Notation "*@A" := (KAny) (in custom oadt at level 0).
Notation "*@P" := (KPublic) (in custom oadt at level 0).
Notation "*@O" := (KObliv) (in custom oadt at level 0).
Notation "*@M" := (KMixed) (in custom oadt at level 0).
Infix "⊔" := (⊔) (in custom oadt at level 50).
End notations.