Lemma subset_lattice : lattice (subtype_set X). Proof. use make_lattice. - exact intersection_binop. - exact union_binop. - apply make_dirprod; [apply make_dirprod|apply make_dirprod; [apply make_dirprod|apply make_dirprod]]. + apply isassoc_intersection_binop. + apply iscomm_intersection_binop. + apply isassoc_union_binop. + apply iscomm_union_binop. + intros ? ?. apply (invweq (hsubtype_univalence _ _)), subtype_equal_cond. use make_dirprod. * intros ? f; exact (f true). * intros ? ?. intros b; induction b; cbn. -- assumption. -- apply hinhpr; exists true; assumption. + intros ? ?. apply (invweq (hsubtype_univalence _ _)), subtype_equal_cond. use make_dirprod. * intros ? f; cbn in f. refine (hinhuniv _ f); clear f; intro f. induction f as [b bin]; induction b; cbn in bin. -- assumption. -- apply (bin true). * intros ? ?; apply hinhpr; exists true; assumption. Defined.
Require Import UniMath.Foundations.Preamble. Require Import UniMath.Foundations.PartA. Require Import UniMath.Foundations.Sets. Require Import UniMath.MoreFoundations.Sets. Require Import UniMath.Algebra.BinaryOperations. Require Import UniMath.OrderTheory.Lattice.Lattice. Require Import UniMath.OrderTheory.Lattice.Bounded. Require Import UniMath.OrderTheory.Lattice.Distributive. Require Import UniMath.OrderTheory.Lattice.Complement. Require Import UniMath.OrderTheory.Lattice.Boolean.