Theorem: ProbabilityTheory.pred_true_of_condCount_eq_one
File: Mathlib/Probability/CondCount.lean

tactic: have hsf := finite_of_condCount_ne_zero (by rw [h]; exact one_ne_zero)
state_before: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
h : (condCount s) t = 1
⊢ s ⊆ t
state_after: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
h : (condCount s) t = 1
hsf : s.Finite
⊢ s ⊆ t

tactic: rw [condCount, cond_apply _ hsf.measurableSet, mul_comm] at h
state_before: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
h : (condCount s) t = 1
hsf : s.Finite
⊢ s ⊆ t
state_after: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
h : Measure.count (s ∩ t) * (Measure.count s)⁻¹ = 1
hsf : s.Finite
⊢ s ⊆ t

tactic: replace h := ENNReal.eq_inv_of_mul_eq_one_left h
state_before: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
h : Measure.count (s ∩ t) * (Measure.count s)⁻¹ = 1
hsf : s.Finite
⊢ s ⊆ t
state_after: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hsf : s.Finite
h : Measure.count (s ∩ t) = (Measure.count s)⁻¹⁻¹
⊢ s ⊆ t

tactic: rw [inv_inv, Measure.count_apply_finite _ hsf, Measure.count_apply_finite _ (hsf.inter_of_left _),
  Nat.cast_inj] at h
state_before: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hsf : s.Finite
h : Measure.count (s ∩ t) = (Measure.count s)⁻¹⁻¹
⊢ s ⊆ t
state_after: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hsf : s.Finite
h : ⋯.toFinset.card = hsf.toFinset.card
⊢ s ⊆ t

tactic: suffices s ∩ t = s by exact this ▸ fun x hx => hx.2
state_before: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hsf : s.Finite
h : ⋯.toFinset.card = hsf.toFinset.card
⊢ s ⊆ t
state_after: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hsf : s.Finite
h : ⋯.toFinset.card = hsf.toFinset.card
⊢ s ∩ t = s

tactic: rw [← @Set.Finite.toFinset_inj _ _ _ (hsf.inter_of_left _) hsf]
state_before: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hsf : s.Finite
h : ⋯.toFinset.card = hsf.toFinset.card
⊢ s ∩ t = s
state_after: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hsf : s.Finite
h : ⋯.toFinset.card = hsf.toFinset.card
⊢ ⋯.toFinset = hsf.toFinset

tactic: exact Finset.eq_of_subset_of_card_le (Set.Finite.toFinset_mono s.inter_subset_left) h.ge
state_before: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hsf : s.Finite
h : ⋯.toFinset.card = hsf.toFinset.card
⊢ ⋯.toFinset = hsf.toFinset
state_after: no goals

tactic: rw [h]
state_before: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
h : (condCount s) t = 1
⊢ (condCount ?m.12519) ?m.12520 ≠ 0
state_after: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
h : (condCount s) t = 1
⊢ 1 ≠ 0

tactic: exact one_ne_zero
state_before: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
h : (condCount s) t = 1
⊢ 1 ≠ 0
state_after: no goals

tactic: exact this ▸ fun x hx => hx.2
state_before: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hsf : s.Finite
h : ⋯.toFinset.card = hsf.toFinset.card
this : s ∩ t = s
⊢ s ⊆ t
state_after: no goals