Skip to content

Commit

Permalink
add comments and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoLuccioli committed Aug 1, 2024
1 parent c39d025 commit a08cf8a
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions TestingLowerBounds/ForMathlib/CountableOrCountablyGenerated.lean
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ namespace MeasurableSpace

variable {α β γ : Type*} [MeasurableSpace α] [MeasurableSpace β] [MeasurableSpace γ]


-- PRed, see #15418
lemma countable_left_of_prod_of_nonempty [Nonempty β] (h : Countable (α × β)) : Countable α := by
contrapose h
rw [not_countable_iff] at *
infer_instance

-- PRed, see #15418
lemma countable_right_of_prod_of_nonempty [Nonempty α] (h : Countable (α × β)) : Countable β := by
contrapose h
rw [not_countable_iff] at *
Expand All @@ -26,7 +26,7 @@ lemma countableOrCountablyGenerated_left_of_prod_left_of_nonempty [Nonempty β]
· have := countable_left_of_prod_of_nonempty h
infer_instance
· infer_instance

-- PRed, see #15418
lemma countableOrCountablyGenerated_right_of_prod_left_of_nonempty [Nonempty α]
[h : CountableOrCountablyGenerated (α × β) γ] :
CountableOrCountablyGenerated β γ := by
Expand Down Expand Up @@ -64,10 +64,9 @@ lemma countableOrCountablyGenerated_left_of_prod_right_of_nonempty [Nonempty γ]
· infer_instance
· have := countablyGenerated_left_of_prod_of_nonempty h
infer_instance

instance [Countable (α × β)] : Countable (β × α) :=
Countable.of_equiv _ (Equiv.prodComm α β)

-- PRed, see #15418
instance [Countable (α × β)] : Countable (β × α) := Countable.of_equiv _ (Equiv.prodComm α β)
-- PRed, see #15418
instance [h : CountableOrCountablyGenerated (α × β) γ] :
CountableOrCountablyGenerated (β × α) γ := by
rcases h with (h | h)
Expand All @@ -78,10 +77,4 @@ instance [h : CountableOrCountablyGenerated (α × β) γ] :
instance [CountablyGenerated (α × β)] : CountablyGenerated (β × α) := by
sorry

instance [h : CountableOrCountablyGenerated (α × β) γ] :
CountableOrCountablyGenerated (β × α) γ := by
rcases h with (h | h)
· exact ⟨Or.inl inferInstance⟩
· exact ⟨Or.inr h⟩

end MeasurableSpace

0 comments on commit a08cf8a

Please sign in to comment.