@@ -26,7 +26,6 @@ intervals.)
26
26
27
27
## Main declarations
28
28
29
- * `has_compl`: a type class for the complement operator
30
29
* `generalized_boolean_algebra`: a type class for generalized Boolean algebras
31
30
* `boolean_algebra`: a type class for Boolean algebras.
32
31
* `Prop.boolean_algebra`: the Boolean algebra instance on `Prop`
@@ -42,11 +41,6 @@ complement operator `a \ b` for all `a`, `b`. Instead, the postulates there amou
42
41
that for all `a, b : α` where `a ≤ b`, the equations `x ⊔ a = b` and `x ⊓ a = ⊥` have a solution
43
42
`x`. `disjoint.sdiff_unique` proves that this `x` is in fact `b \ a`.
44
43
45
- ## Notations
46
-
47
- * `xᶜ` is notation for `compl x`
48
- * `x \ y` is notation for `sdiff x y`.
49
-
50
44
## References
51
45
52
46
* <https://en.wikipedia.org/wiki/Boolean_algebra_(structure)#Generalizations>
@@ -586,14 +580,6 @@ end generalized_boolean_algebra
586
580
### Boolean algebras
587
581
-/
588
582
589
-
590
- /-- Set / lattice complement -/
591
- @[notation_class] class has_compl (α : Type *) := (compl : α → α)
592
-
593
- export has_compl (compl)
594
-
595
- postfix `ᶜ`:(max+1 ) := compl
596
-
597
583
/-- A Boolean algebra is a bounded distributive lattice with a complement operator `ᶜ` such that
598
584
`x ⊓ xᶜ = ⊥` and `x ⊔ xᶜ = ⊤`. For convenience, it must also provide a set difference operation `\`
599
585
satisfying `x \ y = x ⊓ yᶜ`.
@@ -773,37 +759,12 @@ by rw [sdiff_eq, compl_inf, compl_compl]
773
759
end boolean_algebra
774
760
775
761
instance Prop.boolean_algebra : boolean_algebra Prop :=
776
- { compl := not,
777
- inf_compl_le_bot := λ p ⟨Hp, Hpc⟩, Hpc Hp,
762
+ { inf_compl_le_bot := λ p ⟨Hp, Hpc⟩, Hpc Hp,
778
763
top_le_sup_compl := λ p H, classical.em p,
764
+ .. Prop .has_compl,
779
765
.. Prop .distrib_lattice,
780
766
.. Prop .bounded_order }
781
767
782
- instance pi.has_sdiff {ι : Type u} {α : ι → Type v} [∀ i, has_sdiff (α i)] :
783
- has_sdiff (Π i, α i) :=
784
- ⟨λ x y i, x i \ y i⟩
785
-
786
- lemma pi.sdiff_def {ι : Type u} {α : ι → Type v} [∀ i, has_sdiff (α i)] (x y : Π i, α i) :
787
- (x \ y) = λ i, x i \ y i := rfl
788
-
789
- @[simp]
790
- lemma pi.sdiff_apply {ι : Type u} {α : ι → Type v} [∀ i, has_sdiff (α i)] (x y : Π i, α i) (i : ι) :
791
- (x \ y) i = x i \ y i := rfl
792
-
793
- instance pi.has_compl {ι : Type u} {α : ι → Type v} [∀ i, has_compl (α i)] :
794
- has_compl (Π i, α i) :=
795
- ⟨λ x i, (x i)ᶜ⟩
796
-
797
- lemma pi.compl_def {ι : Type u} {α : ι → Type v} [∀ i, has_compl (α i)] (x : Π i, α i) :
798
- xᶜ = λ i, (x i)ᶜ := rfl
799
-
800
- instance is_irrefl.compl (r) [is_irrefl α r] : is_refl α rᶜ := ⟨@irrefl α r _⟩
801
- instance is_refl.compl (r) [is_refl α r] : is_irrefl α rᶜ := ⟨λ a, not_not_intro (refl a)⟩
802
-
803
- @[simp]
804
- lemma pi.compl_apply {ι : Type u} {α : ι → Type v} [∀ i, has_compl (α i)] (x : Π i, α i) (i : ι) :
805
- xᶜ i = (x i)ᶜ := rfl
806
-
807
768
instance pi.boolean_algebra {ι : Type u} {α : ι → Type v} [∀ i, boolean_algebra (α i)] :
808
769
boolean_algebra (Π i, α i) :=
809
770
{ sdiff_eq := λ x y, funext $ λ i, sdiff_eq,
0 commit comments