+ (fun12 __ (oa_meet __) (mk_unary_morphism _ _ f _)).
+
+notation < "hovbox(mstyle scriptlevel 1 scriptsizemultiplier 1.7 (∨) \below (\emsp) \nbsp term 90 p)"
+non associative with precedence 50 for @{ 'oa_join $p }.
+notation < "hovbox(mstyle scriptlevel 1 scriptsizemultiplier 1.7 (∨) \below (ident i ∈ I) break term 90 p)"
+non associative with precedence 50 for @{ 'oa_join_mk (λ${ident i}:$I.$p) }.
+
+notation > "hovbox(∨ f)" non associative with precedence 60
+for @{ 'oa_join $f }.
+interpretation "o-algebra join" 'oa_join f =
+ (fun12 __ (oa_join __) f).
+interpretation "o-algebra join with explicit function" 'oa_join_mk f =
+ (fun12 __ (oa_join __) (mk_unary_morphism _ _ f _)).
+
+definition binary_meet : ∀O:OAlgebra. binary_morphism1 O O O.
+intros; split;
+[ intros (p q);
+ apply (∧ { x ∈ BOOL | match x with [ true ⇒ p | false ⇒ q ] | IF_THEN_ELSE_p ? p q });
+| intros; lapply (prop12 ? O (oa_meet O BOOL));
+ [2: apply ({ x ∈ BOOL | match x with [ true ⇒ a | false ⇒ b ] | IF_THEN_ELSE_p ? a b });
+ |3: apply ({ x ∈ BOOL | match x with [ true ⇒ a' | false ⇒ b' ] | IF_THEN_ELSE_p ? a' b' });
+ | apply Hletin;]
+ intro x; simplify; cases x; simplify; assumption;]
+qed.
+
+interpretation "o-algebra binary meet" 'and a b =
+ (fun21 ___ (binary_meet _) a b).
+
+prefer coercion Type1_OF_OAlgebra.
+
+definition binary_join : ∀O:OAlgebra. binary_morphism1 O O O.
+intros; split;
+[ intros (p q);
+ apply (∨ { x ∈ BOOL | match x with [ true ⇒ p | false ⇒ q ] | IF_THEN_ELSE_p ? p q });
+| intros; lapply (prop12 ? O (oa_join O BOOL));
+ [2: apply ({ x ∈ BOOL | match x with [ true ⇒ a | false ⇒ b ] | IF_THEN_ELSE_p ? a b });
+ |3: apply ({ x ∈ BOOL | match x with [ true ⇒ a' | false ⇒ b' ] | IF_THEN_ELSE_p ? a' b' });
+ | apply Hletin;]
+ intro x; simplify; cases x; simplify; assumption;]
+qed.
+
+interpretation "o-algebra binary join" 'or a b =
+ (fun21 ___ (binary_join _) a b).
+
+lemma oa_overlap_preservers_meet: ∀O:OAlgebra.∀p,q:O.p >< q → p >< (p ∧ q).
+(* next change to avoid universe inconsistency *)
+change in ⊢ (?→%→%→?) with (Type1_OF_OAlgebra O);
+intros; lapply (oa_overlap_preserves_meet_ O p q f);
+lapply (prop21 O O CPROP (oa_overlap O) p p ? (p ∧ q) # ?);
+[3: apply (if ?? (Hletin1)); apply Hletin;|skip] apply refl1;
+qed.