Skip to content

Commit

Permalink
new factory for algebra of sets
Browse files Browse the repository at this point in the history
Co-authored-by: @JeremyDubut
Co-authored-by: @AkihisaYamada
  • Loading branch information
affeldt-aist committed Jul 22, 2024
1 parent b3cb11a commit ce1ad9a
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG_UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

- in `topology.v`:
+ lemma `ball_subspace_ball`
- in `classical_sets.v`:
+ lemma `setCD`

- in `measure.v`:
+ factory `isAlgebraOfSetsD`

- in `classical_sets.v`:
+ lemma `setDU`
Expand Down
3 changes: 3 additions & 0 deletions classical/classical_sets.v
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,9 @@ Qed.
Lemma setCI A B : ~` (A `&` B) = ~` A `|` ~` B.
Proof. by rewrite -[in LHS](setCK A) -[in LHS](setCK B) -setCU setCK. Qed.

Lemma setCD A B : ~` (A `\` B) = ~` A `|` B.
Proof. by rewrite setDE setCI setCK. Qed.

Lemma setDUr A B C : A `\` (B `|` C) = (A `\` B) `&` (A `\` C).
Proof. by rewrite !setDE setCU setIIr. Qed.

Expand Down
22 changes: 22 additions & 0 deletions theories/measure.v
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,28 @@ HB.instance Definition _ := RingOfSets_isAlgebraOfSets.Build d T measurableT.

HB.end.

HB.factory Record isAlgebraOfSetsD (d : measure_display) T of Pointed T := {
measurable : set (set T) ;
measurableT : measurable [set: T] ;
measurableD : setDI_closed measurable
}.

HB.builders Context d T of isAlgebraOfSetsD d T.

Let m0 : measurable set0.
Proof. by rewrite -(setDT setT); apply: measurableD; exact: measurableT. Qed.

Let mU : setU_closed measurable.
Proof.
move=> A B mA mB.
rewrite -(setCK A) -setCD -!setTD; apply: measurableD; first exact: measurableT.
by do 2 apply: measurableD => //; exact: measurableT.
Qed.

HB.instance Definition _ := isRingOfSets.Build d T m0 mU measurableD.

HB.end.

HB.factory Record isMeasurable (d : measure_display) T of Pointed T := {
measurable : set (set T) ;
measurable0 : measurable set0 ;
Expand Down
10 changes: 8 additions & 2 deletions theories/topology.v
Original file line number Diff line number Diff line change
Expand Up @@ -4772,7 +4772,8 @@ HB.instance Definition _ := Uniform_isPseudoMetric.Build R M

HB.end.

Lemma entourage_ballE {R : numDomainType} {M : pseudoMetricType R} : entourage_ (@ball R M) = entourage.
Lemma entourage_ballE {R : numDomainType} {M : pseudoMetricType R} :
entourage_ (@ball R M) = entourage.
Proof. by rewrite entourageE_subproof. Qed.

Lemma entourage_from_ballE {R : numDomainType} {M : pseudoMetricType R} :
Expand All @@ -4791,7 +4792,8 @@ Definition nbhs_ball_ {R : numDomainType} {T T'} (ball : T -> R -> set T')
Definition nbhs_ball {R : numDomainType} {M : pseudoMetricType R} :=
nbhs_ball_ (@ball R M).

Lemma nbhs_ballE {R : numDomainType} {M : pseudoMetricType R} : (@nbhs_ball R M) = nbhs.
Lemma nbhs_ballE {R : numDomainType} {M : pseudoMetricType R} :
@nbhs_ball R M = nbhs.
Proof.
rewrite predeq2E => x P; rewrite -nbhs_entourageE; split.
by move=> [_/posnumP[e] sbxeP]; exists [set xy | ball xy.1 e%:num xy.2].
Expand Down Expand Up @@ -5360,11 +5362,14 @@ Qed.

Section pseudoMetric_of_normedDomain.
Context {K : numDomainType} {R : normedZmodType K}.

Lemma ball_norm_center (x : R) (e : K) : 0 < e -> ball_ Num.norm x e x.
Proof. by move=> ? /=; rewrite subrr normr0. Qed.

Lemma ball_norm_symmetric (x y : R) (e : K) :
ball_ Num.norm x e y -> ball_ Num.norm y e x.
Proof. by rewrite /= distrC. Qed.

Lemma ball_norm_triangle (x y z : R) (e1 e2 : K) :
ball_ Num.norm x e1 y -> ball_ Num.norm y e2 z -> ball_ Num.norm x (e1 + e2) z.
Proof.
Expand All @@ -5380,6 +5385,7 @@ rewrite /nbhs_ entourage_E predeq2E => x A; split.
by exists [set xy | ball_ Num.norm xy.1 e xy.2] => //; exists e.
by move=> [E [e egt0 sbeE] sEA]; exists e => // ??; apply/sEA/sbeE.
Qed.

End pseudoMetric_of_normedDomain.

HB.instance Definition _ (R : zmodType) := Pointed.on R^o.
Expand Down

0 comments on commit ce1ad9a

Please sign in to comment.