tasksource/leandojo huggingface dataset:
Theorem: CompleteLattice.independent_iff_forall_dfinsupp
File: Mathlib/LinearAlgebra/Dfinsupp.lean

tactic: simp_rw [CompleteLattice.independent_def, Submodule.disjoint_def,
  Submodule.mem_biSup_iff_exists_dfinsupp, exists_imp, filter_ne_eq_erase]
state_before: ι : Type u_3
R : Type u_1
S : Type ?u.465837
M : ι → Type ?u.465842
N : Type u_2
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
⊢ Independent p ↔
    ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),
      ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0

tactic: refine' forall_congr' fun i => Subtype.forall'.trans _
state_before: ι : Type u_3
R : Type u_1
S : Type ?u.465837
M : ι → Type ?u.465842
N : Type u_2
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
⊢ (∀ (i : ι) (x : N),
      x ∈ p i →
        ∀ (x_1 : Π₀ (i : ι), { x // x ∈ p i }),
          ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i x_1) = x → x = 0) ↔
    ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),
      ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0

tactic: simp_rw [Submodule.coe_eq_zero]
state_before: ι : Type u_3
R : Type u_1
S : Type ?u.465837
M : ι → Type ?u.465842
N : Type u_2
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
i : ι
⊢ (∀ (x : { a // a ∈ p i }) (x_1 : Π₀ (i : ι), { x // x ∈ p i }),
      ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i x_1) = ↑x → ↑x = 0) ↔
    ∀ (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),
      ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0
Theorem: Multiset.noncommProd_commute
File: Mathlib/Data/Finset/NoncommProd.lean

tactic: induction s using Quotient.inductionOn
state_before: F : Type ?u.136558
ι : Type ?u.136561
α : Type u_1
β : Type ?u.136567
γ : Type ?u.136570
f : α → β → β
op : α → α → α
inst✝¹ : Monoid α
inst✝ : Monoid β
s : Multiset α
comm : Set.Pairwise {x | x ∈ s} Commute
y : α
h : ∀ (x : α), x ∈ s → Commute y x
⊢ Commute y (noncommProd s comm)

tactic: simp only [quot_mk_to_coe, noncommProd_coe]
state_before: case h
F : Type ?u.136558
ι : Type ?u.136561
α : Type u_1
β : Type ?u.136567
γ : Type ?u.136570
f : α → β → β
op : α → α → α
inst✝¹ : Monoid α
inst✝ : Monoid β
y : α
a✝ : List α
comm : Set.Pairwise {x | x ∈ Quotient.mk (List.isSetoid α) a✝} Commute
h : ∀ (x : α), x ∈ Quotient.mk (List.isSetoid α) a✝ → Commute y x
⊢ Commute y (noncommProd (Quotient.mk (List.isSetoid α) a✝) comm)

tactic: exact Commute.list_prod_right _ _ h
state_before: case h
F : Type ?u.136558
ι : Type ?u.136561
α : Type u_1
β : Type ?u.136567
γ : Type ?u.136570
f : α → β → β
op : α → α → α
inst✝¹ : Monoid α
inst✝ : Monoid β
y : α
a✝ : List α
comm : Set.Pairwise {x | x ∈ Quotient.mk (List.isSetoid α) a✝} Commute
h : ∀ (x : α), x ∈ Quotient.mk (List.isSetoid α) a✝ → Commute y x
⊢ Commute y (List.prod a✝)
Theorem: Metric.Sigma.dist_same
File: Mathlib/Topology/MetricSpace/Gluing.lean

tactic: simp [Dist.dist, Sigma.dist]
state_before: ι : Type u_2
E : ι → Type u_1
inst✝ : (i : ι) → MetricSpace (E i)
i : ι
x y : E i
⊢ dist { fst := i, snd := x } { fst := i, snd := y } = dist x y
Theorem: Nat.Prime.multiplicity_choose
File: Mathlib/Data/Nat/Multiplicity.lean

tactic: have h₁ :
  multiplicity p (choose n k) + multiplicity p (k ! * (n - k)!) =
    ((Finset.Ico 1 b).filter fun i => p ^ i ≤ k % p ^ i + (n - k) % p ^ i).card +
      multiplicity p (k ! * (n - k)!) := by
  rw [← hp.multiplicity_mul, ← mul_assoc, choose_mul_factorial_mul_factorial hkn,
    hp.multiplicity_factorial hnb, hp.multiplicity_mul,
    hp.multiplicity_factorial ((log_mono_right hkn).trans_lt hnb),
    hp.multiplicity_factorial (lt_of_le_of_lt (log_mono_right tsub_le_self) hnb),
    multiplicity_choose_aux hp hkn]
  simp [add_comm]
state_before: p n k b : ℕ
hp : Prime p
hkn : k ≤ n
hnb : log p n < b
⊢ multiplicity p (choose n k) = ↑(card (filter (fun i => p ^ i ≤ k % p ^ i + (n - k) % p ^ i) (Ico 1 b)))

tactic: refine (PartENat.add_right_cancel_iff ?_).1 h₁
state_before: p n k b : ℕ
hp : Prime p
hkn : k ≤ n
hnb : log p n < b
h₁ :
  multiplicity p (choose n k) + multiplicity p (k ! * (n - k)!) =
    ↑(card (filter (fun i => p ^ i ≤ k % p ^ i + (n - k) % p ^ i) (Ico 1 b))) + multiplicity p (k ! * (n - k)!)
⊢ multiplicity p (choose n k) = ↑(card (filter (fun i => p ^ i ≤ k % p ^ i + (n - k) % p ^ i) (Ico 1 b)))

tactic: apply PartENat.ne_top_iff_dom.2
state_before: p n k b : ℕ
hp : Prime p
hkn : k ≤ n
hnb : log p n < b
h₁ :
  multiplicity p (choose n k) + multiplicity p (k ! * (n - k)!) =
    ↑(card (filter (fun i => p ^ i ≤ k % p ^ i + (n - k) % p ^ i) (Ico 1 b))) + multiplicity p (k ! * (n - k)!)
⊢ multiplicity p (k ! * (n - k)!) ≠ ⊤

tactic: exact finite_nat_iff.2 ⟨hp.ne_one, mul_pos (factorial_pos k) (factorial_pos (n - k))⟩
state_before: p n k b : ℕ
hp : Prime p
hkn : k ≤ n
hnb : log p n < b
h₁ :
  multiplicity p (choose n k) + multiplicity p (k ! * (n - k)!) =
    ↑(card (filter (fun i => p ^ i ≤ k % p ^ i + (n - k) % p ^ i) (Ico 1 b))) + multiplicity p (k ! * (n - k)!)
⊢ (multiplicity p (k ! * (n - k)!)).Dom

tactic: rw [← hp.multiplicity_mul, ← mul_assoc, choose_mul_factorial_mul_factorial hkn,
  hp.multiplicity_factorial hnb, hp.multiplicity_mul,
  hp.multiplicity_factorial ((log_mono_right hkn).trans_lt hnb),
  hp.multiplicity_factorial (lt_of_le_of_lt (log_mono_right tsub_le_self) hnb),
  multiplicity_choose_aux hp hkn]
state_before: p n k b : ℕ
hp : Prime p
hkn : k ≤ n
hnb : log p n < b
⊢ multiplicity p (choose n k) + multiplicity p (k ! * (n - k)!) =
    ↑(card (filter (fun i => p ^ i ≤ k % p ^ i + (n - k) % p ^ i) (Ico 1 b))) + multiplicity p (k ! * (n - k)!)

tactic: simp [add_comm]
state_before: p n k b : ℕ
hp : Prime p
hkn : k ≤ n
hnb : log p n < b
⊢ ↑(∑ i in Ico 1 b, k / p ^ i + ∑ i in Ico 1 b, (n - k) / p ^ i +
        card (filter (fun i => p ^ i ≤ k % p ^ i + (n - k) % p ^ i) (Ico 1 b))) =
    ↑(card (filter (fun i => p ^ i ≤ k % p ^ i + (n - k) % p ^ i) (Ico 1 b))) +
      (↑(∑ i in Ico 1 b, k / p ^ i) + ↑(∑ i in Ico 1 b, (n - k) / p ^ i))
Theorem: PadicSeq.lift_index_left
File: Mathlib/NumberTheory/Padics/PadicNumbers.lean

tactic: apply stationaryPoint_spec hf
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
f : PadicSeq p
hf : ¬f ≈ 0
v1 v3 : ℕ
⊢ padicNorm p (↑f (stationaryPoint hf)) = padicNorm p (↑f (max v1 (max (stationaryPoint hf) v3)))

tactic: apply le_trans
state_before: case a
p : ℕ
inst✝ : Fact (Nat.Prime p)
f : PadicSeq p
hf : ¬f ≈ 0
v1 v3 : ℕ
⊢ stationaryPoint hf ≤ max v1 (max (stationaryPoint hf) v3)

tactic: apply le_max_left _ v3
state_before: case a.a
p : ℕ
inst✝ : Fact (Nat.Prime p)
f : PadicSeq p
hf : ¬f ≈ 0
v1 v3 : ℕ
⊢ stationaryPoint hf ≤ ?a.b✝

tactic: apply le_max_right
state_before: case a.a
p : ℕ
inst✝ : Fact (Nat.Prime p)
f : PadicSeq p
hf : ¬f ≈ 0
v1 v3 : ℕ
⊢ max (stationaryPoint hf) v3 ≤ max v1 (max (stationaryPoint hf) v3)

tactic: exact le_rfl
state_before: case a
p : ℕ
inst✝ : Fact (Nat.Prime p)
f : PadicSeq p
hf : ¬f ≈ 0
v1 v3 : ℕ
⊢ stationaryPoint hf ≤ stationaryPoint hf
Theorem: ProbabilityTheory.indep_iSup_of_disjoint
File: Mathlib/Probability/Independence/Basic.lean

tactic: refine'
  IndepSets.indep (iSup₂_le fun i _ => h_le i) (iSup₂_le fun i _ => h_le i) _ _
    (generateFrom_piiUnionInter_measurableSet m S).symm
    (generateFrom_piiUnionInter_measurableSet m T).symm _
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
inst✝ : IsProbabilityMeasure μ
m : ι → MeasurableSpace Ω
h_le : ∀ (i : ι), m i ≤ m0
h_indep : iIndep m
S T : Set ι
hST : Disjoint S T
⊢ Indep (⨆ (i : ι) (_ : i ∈ S), m i) (⨆ (i : ι) (_ : i ∈ T), m i)

tactic: exact isPiSystem_piiUnionInter _ (fun n => @isPiSystem_measurableSet Ω (m n)) _
state_before: case refine'_1
Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
inst✝ : IsProbabilityMeasure μ
m : ι → MeasurableSpace Ω
h_le : ∀ (i : ι), m i ≤ m0
h_indep : iIndep m
S T : Set ι
hST : Disjoint S T
⊢ IsPiSystem (piiUnionInter (fun n => {s | MeasurableSet s}) S)

tactic: exact isPiSystem_piiUnionInter _ (fun n => @isPiSystem_measurableSet Ω (m n)) _
state_before: case refine'_2
Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
inst✝ : IsProbabilityMeasure μ
m : ι → MeasurableSpace Ω
h_le : ∀ (i : ι), m i ≤ m0
h_indep : iIndep m
S T : Set ι
hST : Disjoint S T
⊢ IsPiSystem (piiUnionInter (fun n => {s | MeasurableSet s}) T)

tactic: classical exact indepSets_piiUnionInter_of_disjoint h_indep hST
state_before: case refine'_3
Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
inst✝ : IsProbabilityMeasure μ
m : ι → MeasurableSpace Ω
h_le : ∀ (i : ι), m i ≤ m0
h_indep : iIndep m
S T : Set ι
hST : Disjoint S T
⊢ IndepSets (piiUnionInter (fun n => {s | MeasurableSet s}) S) (piiUnionInter (fun n => {s | MeasurableSet s}) T)

tactic: exact indepSets_piiUnionInter_of_disjoint h_indep hST
state_before: case refine'_3
Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
inst✝ : IsProbabilityMeasure μ
m : ι → MeasurableSpace Ω
h_le : ∀ (i : ι), m i ≤ m0
h_indep : iIndep m
S T : Set ι
hST : Disjoint S T
⊢ IndepSets (piiUnionInter (fun n => {s | MeasurableSet s}) S) (piiUnionInter (fun n => {s | MeasurableSet s}) T)
Theorem: CategoryTheory.isCodetector_op_iff
File: Mathlib/CategoryTheory/Generator.lean

tactic: rw [IsDetector, IsCodetector, ← isCodetecting_op_iff, Set.singleton_op]
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
G : C
⊢ IsCodetector G.op ↔ IsDetector G
Theorem: Complex.tanh_ofReal_im
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [← ofReal_tanh_ofReal_re, ofReal_im]
state_before: x✝ y : ℂ
x : ℝ
⊢ (tanh ↑x).im = 0
Theorem: Stream'.zip_inits_tails
File: Mathlib/Data/Stream/Init.lean

tactic: apply Stream'.ext
state_before: α : Type u
β : Type v
δ : Type w
s : Stream' α
⊢ zip appendStream' (inits s) (tails s) = const s

tactic: intro n
state_before: case a
α : Type u
β : Type v
δ : Type w
s : Stream' α
⊢ ∀ (n : ℕ), nth (zip appendStream' (inits s) (tails s)) n = nth (const s) n

tactic: rw [nth_zip, nth_inits, nth_tails, nth_const, take_succ, cons_append_stream, append_take_drop,
  Stream'.eta]
state_before: case a
α : Type u
β : Type v
δ : Type w
s : Stream' α
n : ℕ
⊢ nth (zip appendStream' (inits s) (tails s)) n = nth (const s) n
Theorem: AlgHom.coe_range
File: Mathlib/Algebra/Algebra/Subalgebra/Basic.lean

tactic: ext
state_before: R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : Semiring C
inst✝ : Algebra R C
φ✝ φ : A →ₐ[R] B
⊢ ↑(AlgHom.range φ) = Set.range ↑φ

tactic: rw [SetLike.mem_coe, mem_range]
state_before: case h
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : Semiring C
inst✝ : Algebra R C
φ✝ φ : A →ₐ[R] B
x✝ : B
⊢ x✝ ∈ ↑(AlgHom.range φ) ↔ x✝ ∈ Set.range ↑φ

tactic: rfl
state_before: case h
R' : Type u'
R : Type u
A : Type v
B : Type w
C : Type w'
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : Algebra R A
inst✝³ : Semiring B
inst✝² : Algebra R B
inst✝¹ : Semiring C
inst✝ : Algebra R C
φ✝ φ : A →ₐ[R] B
x✝ : B
⊢ (∃ x, ↑φ x = x✝) ↔ x✝ ∈ Set.range ↑φ
Theorem: PowerSeries.rescale_X
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: ext
state_before: R : Type ?u.3514033
A : Type u_1
inst✝ : CommRing A
a : A
⊢ ↑(rescale a) X = ↑(C A) a * X

tactic: simp only [coeff_rescale, coeff_C_mul, coeff_X]
state_before: case h
R : Type ?u.3514033
A : Type u_1
inst✝ : CommRing A
a : A
n✝ : ℕ
⊢ ↑(coeff A n✝) (↑(rescale a) X) = ↑(coeff A n✝) (↑(C A) a * X)

tactic: split_ifs with h <;> simp [h]
state_before: case h
R : Type ?u.3514033
A : Type u_1
inst✝ : CommRing A
a : A
n✝ : ℕ
⊢ (a ^ n✝ * if n✝ = 1 then 1 else 0) = a * if n✝ = 1 then 1 else 0
Theorem: Set.exists_eq_insert_iff_ncard
File: Mathlib/Data/Set/Ncard.lean

tactic: cases' t.finite_or_infinite with ht ht
state_before: α : Type u_1
β : Type ?u.140128
s t : Set α
a b x y : α
f : α → β
hs : autoParam (Set.Finite s) _auto✝
⊢ (∃ a x, insert a s = t) ↔ s ⊆ t ∧ ncard s + 1 = ncard t

tactic: simp only [ht.ncard, exists_prop, add_eq_zero, and_false, iff_false, not_exists, not_and]
state_before: case inr
α : Type u_1
β : Type ?u.140128
s t : Set α
a b x y : α
f : α → β
hs : autoParam (Set.Finite s) _auto✝
ht : Set.Infinite t
⊢ (∃ a x, insert a s = t) ↔ s ⊆ t ∧ ncard s + 1 = ncard t

tactic: rintro x - rfl
state_before: case inr
α : Type u_1
β : Type ?u.140128
s t : Set α
a b x y : α
f : α → β
hs : autoParam (Set.Finite s) _auto✝
ht : Set.Infinite t
⊢ ∀ (x : α), ¬x ∈ s → ¬insert x s = t

tactic: exact ht (hs.insert x)
state_before: case inr
α : Type u_1
β : Type ?u.140128
s : Set α
a b x✝ y : α
f : α → β
hs : autoParam (Set.Finite s) _auto✝
x : α
ht : Set.Infinite (insert x s)
⊢ False

tactic: rw [ncard_eq_toFinset_card _ hs, ncard_eq_toFinset_card _ ht,
  ←@Finite.toFinset_subset_toFinset _ _ _ hs ht, ←Finset.exists_eq_insert_iff]
state_before: case inl
α : Type u_1
β : Type ?u.140128
s t : Set α
a b x y : α
f : α → β
hs : autoParam (Set.Finite s) _auto✝
ht : Set.Finite t
⊢ (∃ a x, insert a s = t) ↔ s ⊆ t ∧ ncard s + 1 = ncard t

tactic: convert Iff.rfl using 2
state_before: case inl
α : Type u_1
β : Type ?u.140128
s t : Set α
a b x y : α
f : α → β
hs : autoParam (Set.Finite s) _auto✝
ht : Set.Finite t
⊢ (∃ a x, insert a s = t) ↔ ∃ a x, insert a (Finite.toFinset hs) = Finite.toFinset ht

tactic: simp
state_before: case h.e'_2.h.e'_2
α : Type u_1
β : Type ?u.140128
s t : Set α
a b x y : α
f : α → β
hs : autoParam (Set.Finite s) _auto✝
ht : Set.Finite t
⊢ (fun a => ∃ x, insert a (Finite.toFinset hs) = Finite.toFinset ht) = fun a => ∃ x, insert a s = t

tactic: ext x
state_before: case h.e'_2.h.e'_2
α : Type u_1
β : Type ?u.140128
s t : Set α
a b x y : α
f : α → β
hs : autoParam (Set.Finite s) _auto✝
ht : Set.Finite t
⊢ (fun a => ¬a ∈ s ∧ insert a (Finite.toFinset hs) = Finite.toFinset ht) = fun a => ¬a ∈ s ∧ insert a s = t

tactic: simp [Finset.ext_iff, Set.ext_iff]
state_before: case h.e'_2.h.e'_2.h.a
α : Type u_1
β : Type ?u.140128
s t : Set α
a b x✝ y : α
f : α → β
hs : autoParam (Set.Finite s) _auto✝
ht : Set.Finite t
x : α
⊢ ¬x ∈ s ∧ insert x (Finite.toFinset hs) = Finite.toFinset ht ↔ ¬x ∈ s ∧ insert x s = t
Theorem: Polynomial.natDegree_pow_X_add_C
File: Mathlib/Data/Polynomial/Monic.lean

tactic: rw [(monic_X_add_C r).natDegree_pow, natDegree_X_add_C, mul_one]
state_before: R : Type u
S : Type v
a b : R
m n✝ : ℕ
ι : Type y
inst✝¹ : Semiring R
p q r✝ : R[X]
inst✝ : Nontrivial R
n : ℕ
r : R
⊢ natDegree ((X + ↑C r) ^ n) = n
Theorem: List.foldl_eq_foldr'
File: Mathlib/Data/List/Basic.lean

tactic: rw [foldl_eq_of_comm' hf, foldr, foldl_eq_foldr' ..]
state_before: ι : Type ?u.250748
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → β → α
hf : ∀ (a : α) (b c : β), f (f a b) c = f (f a c) b
a : α
b : β
l : List β
⊢ foldl f a (b :: l) = foldr (flip f) a (b :: l)

tactic: rfl
state_before: ι : Type ?u.250748
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → β → α
hf : ∀ (a : α) (b c : β), f (f a b) c = f (f a c) b
a : α
b : β
l : List β
⊢ f (foldr (flip f) a l) b = flip f b (foldr (flip f) a l)
Theorem: IsGδ.dense_biUnion_interior_of_closed
File: Mathlib/Topology/MetricSpace/Baire.lean

tactic: haveI := ht.toEncodable
state_before: α : Type u_2
β : Type ?u.25899
γ : Type ?u.25902
ι : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : BaireSpace α
t : Set ι
s : Set α
hs : IsGδ s
hd : Dense s
ht : Set.Countable t
f : ι → Set α
hc : ∀ (i : ι), i ∈ t → IsClosed (f i)
hU : s ⊆ ⋃ (i : ι) (_ : i ∈ t), f i
⊢ Dense (⋃ (i : ι) (_ : i ∈ t), interior (f i))

tactic: simp only [biUnion_eq_iUnion, SetCoe.forall'] at *
state_before: α : Type u_2
β : Type ?u.25899
γ : Type ?u.25902
ι : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : BaireSpace α
t : Set ι
s : Set α
hs : IsGδ s
hd : Dense s
ht : Set.Countable t
f : ι → Set α
hc : ∀ (i : ι), i ∈ t → IsClosed (f i)
hU : s ⊆ ⋃ (i : ι) (_ : i ∈ t), f i
this : Encodable ↑t
⊢ Dense (⋃ (i : ι) (_ : i ∈ t), interior (f i))

tactic: exact hs.dense_iUnion_interior_of_closed hd hc hU
state_before: α : Type u_2
β : Type ?u.25899
γ : Type ?u.25902
ι : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : BaireSpace α
t : Set ι
s : Set α
hs : IsGδ s
hd : Dense s
ht : Set.Countable t
f : ι → Set α
this : Encodable ↑t
hc : ∀ (x : ↑t), IsClosed (f ↑x)
hU : s ⊆ ⋃ (x : ↑t), f ↑x
⊢ Dense (⋃ (x : ↑t), interior (f ↑x))
Theorem: IsPiSystem.comap
File: Mathlib/MeasureTheory/PiSystem.lean

tactic: rintro _ ⟨s, hs_mem, rfl⟩ _ ⟨t, ht_mem, rfl⟩ hst
state_before: α : Type u_1
β : Type u_2
S : Set (Set β)
h_pi : IsPiSystem S
f : α → β
⊢ IsPiSystem {s | ∃ t, t ∈ S ∧ f ⁻¹' t = s}

tactic: rw [← Set.preimage_inter] at hst⊢
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type u_2
S : Set (Set β)
h_pi : IsPiSystem S
f : α → β
s : Set β
hs_mem : s ∈ S
t : Set β
ht_mem : t ∈ S
hst : Set.Nonempty (f ⁻¹' s ∩ f ⁻¹' t)
⊢ f ⁻¹' s ∩ f ⁻¹' t ∈ {s | ∃ t, t ∈ S ∧ f ⁻¹' t = s}

tactic: refine' ⟨s ∩ t, h_pi s hs_mem t ht_mem _, rfl⟩
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type u_2
S : Set (Set β)
h_pi : IsPiSystem S
f : α → β
s : Set β
hs_mem : s ∈ S
t : Set β
ht_mem : t ∈ S
hst : Set.Nonempty (f ⁻¹' (s ∩ t))
⊢ f ⁻¹' (s ∩ t) ∈ {s | ∃ t, t ∈ S ∧ f ⁻¹' t = s}

tactic: by_contra h
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type u_2
S : Set (Set β)
h_pi : IsPiSystem S
f : α → β
s : Set β
hs_mem : s ∈ S
t : Set β
ht_mem : t ∈ S
hst : Set.Nonempty (f ⁻¹' (s ∩ t))
⊢ Set.Nonempty (s ∩ t)

tactic: rw [Set.not_nonempty_iff_eq_empty] at h
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type u_2
S : Set (Set β)
h_pi : IsPiSystem S
f : α → β
s : Set β
hs_mem : s ∈ S
t : Set β
ht_mem : t ∈ S
hst : Set.Nonempty (f ⁻¹' (s ∩ t))
h : ¬Set.Nonempty (s ∩ t)
⊢ False

tactic: rw [h] at hst
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type u_2
S : Set (Set β)
h_pi : IsPiSystem S
f : α → β
s : Set β
hs_mem : s ∈ S
t : Set β
ht_mem : t ∈ S
hst : Set.Nonempty (f ⁻¹' (s ∩ t))
h : s ∩ t = ∅
⊢ False

tactic: simp at hst
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type u_2
S : Set (Set β)
h_pi : IsPiSystem S
f : α → β
s : Set β
hs_mem : s ∈ S
t : Set β
ht_mem : t ∈ S
hst : Set.Nonempty (f ⁻¹' ∅)
h : s ∩ t = ∅
⊢ False
Theorem: Equiv.swap_eq_refl_iff
File: Mathlib/Logic/Equiv/Basic.lean

tactic: refine' ⟨fun h => (Equiv.refl _).injective _, fun h => h ▸ swap_self _⟩
state_before: α : Sort u_1
inst✝ : DecidableEq α
x y : α
⊢ swap x y = Equiv.refl α ↔ x = y

tactic: rw [← h, swap_apply_left, h, refl_apply]
state_before: α : Sort u_1
inst✝ : DecidableEq α
x y : α
h : swap x y = Equiv.refl α
⊢ ↑(Equiv.refl α) x = ↑(Equiv.refl α) y
Theorem: Metric.isOpen_singleton_iff
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: simp [isOpen_iff, subset_singleton_iff, mem_ball]
state_before: α✝ : Type u
β : Type v
X : Type ?u.146352
ι : Type ?u.146355
inst✝¹ : PseudoMetricSpace α✝
x✝ y z : α✝
δ ε ε₁ ε₂ : ℝ
s : Set α✝
α : Type u_1
inst✝ : PseudoMetricSpace α
x : α
⊢ IsOpen {x} ↔ ∃ ε, ε > 0 ∧ ∀ (y : α), dist y x < ε → y = x
Theorem: intervalIntegral.integral_comp_add_left
File: Mathlib/MeasureTheory/Integral/IntervalIntegral.lean

tactic: simpa only [add_comm d] using integral_comp_add_right f d
state_before: ι : Type ?u.14871374
𝕜 : Type ?u.14871377
E : Type u_1
F : Type ?u.14871383
A : Type ?u.14871386
inst✝² : NormedAddCommGroup E
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
a b c d✝ : ℝ
f : ℝ → E
d : ℝ
⊢ (∫ (x : ℝ) in a..b, f (d + x)) = ∫ (x : ℝ) in d + a..d + b, f x
Theorem: Quaternion.normSq_neg
File: Mathlib/Algebra/Quaternion.lean

tactic: simp only [normSq_def, star_neg, neg_mul_neg]
state_before: S : Type ?u.680334
T : Type ?u.680337
R : Type u_1
inst✝ : CommRing R
r x y z : R
a b c : ℍ[R]
⊢ ↑normSq (-a) = ↑normSq a
Theorem: PEquiv.mem_single_iff
File: Mathlib/Data/PEquiv.lean

tactic: dsimp [single]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type x
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : DecidableEq γ
a₁ a₂ : α
b₁ b₂ : β
⊢ b₁ ∈ ↑(single a₂ b₂) a₁ ↔ a₁ = a₂ ∧ b₁ = b₂

tactic: split_ifs <;> simp [*, eq_comm]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type x
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : DecidableEq γ
a₁ a₂ : α
b₁ b₂ : β
⊢ (b₁ ∈ if a₁ = a₂ then some b₂ else none) ↔ a₁ = a₂ ∧ b₁ = b₂
Theorem: MeasureTheory.MeasurePreserving.lintegral_comp_emb
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: rw [← hg.map_eq, hge.lintegral_map]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.1686960
δ : Type ?u.1686963
m : MeasurableSpace α
μ ν✝ : Measure α
mb : MeasurableSpace β
ν : Measure β
g : α → β
hg : MeasurePreserving g
hge : MeasurableEmbedding g
f : β → ℝ≥0∞
⊢ (∫⁻ (a : α), f (g a) ∂μ) = ∫⁻ (b : β), f b ∂ν
Theorem: Set.eval_preimage
File: Mathlib/Data/Set/Prod.lean

tactic: ext x
state_before: ι : Type u_1
α : ι → Type u_2
β : ι → Type ?u.158390
s✝ s₁ s₂ : Set ι
t t₁ t₂ : (i : ι) → Set (α i)
i : ι
inst✝ : DecidableEq ι
s : Set (α i)
⊢ eval i ⁻¹' s = pi univ (update (fun i => univ) i s)

tactic: simp [@forall_update_iff _ (fun i => Set (α i)) _ _ _ _ fun i' y => x i' ∈ y]
state_before: case h
ι : Type u_1
α : ι → Type u_2
β : ι → Type ?u.158390
s✝ s₁ s₂ : Set ι
t t₁ t₂ : (i : ι) → Set (α i)
i : ι
inst✝ : DecidableEq ι
s : Set (α i)
x : (x : ι) → α x
⊢ x ∈ eval i ⁻¹' s ↔ x ∈ pi univ (update (fun i => univ) i s)
Theorem: MeasureTheory.le_extend
File: Mathlib/MeasureTheory/Measure/OuterMeasure.lean

tactic: simp only [extend, le_iInf_iff]
state_before: α : Type u_1
P : α → Prop
m : (s : α) → P s → ℝ≥0∞
s : α
h : P s
⊢ m s h ≤ extend m s

tactic: intro
state_before: α : Type u_1
P : α → Prop
m : (s : α) → P s → ℝ≥0∞
s : α
h : P s
⊢ ∀ (i : P s), m s h ≤ m s i

tactic: rfl
state_before: α : Type u_1
P : α → Prop
m : (s : α) → P s → ℝ≥0∞
s : α
h i✝ : P s
⊢ m s h ≤ m s i✝
Theorem: Fin.repeat_one
File: Mathlib/Data/Fin/Tuple/Basic.lean

tactic: generalize_proofs h
state_before: m n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ (succ i)
i : Fin n
y : α✝ (succ i)
z : α✝ 0
α : Type u_1
a : Fin n → α
⊢ repeat 1 a = a ∘ ↑(cast (_ : 1 * n = n))

tactic: apply funext
state_before: m n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ (succ i)
i : Fin n
y : α✝ (succ i)
z : α✝ 0
α : Type u_1
a : Fin n → α
h : 1 * n = n
⊢ repeat 1 a = a ∘ ↑(cast h)

tactic: rw [(Fin.cast h.symm).surjective.forall]
state_before: case h
m n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ (succ i)
i : Fin n
y : α✝ (succ i)
z : α✝ 0
α : Type u_1
a : Fin n → α
h : 1 * n = n
⊢ ∀ (x : Fin (1 * n)), repeat 1 a x = (a ∘ ↑(cast h)) x

tactic: intro i
state_before: case h
m n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ (succ i)
i : Fin n
y : α✝ (succ i)
z : α✝ 0
α : Type u_1
a : Fin n → α
h : 1 * n = n
⊢ ∀ (x : Fin n), repeat 1 a (↑(cast (_ : n = 1 * n)) x) = (a ∘ ↑(cast h)) (↑(cast (_ : n = 1 * n)) x)

tactic: simp [modNat, Nat.mod_eq_of_lt i.is_lt]
state_before: case h
m n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ (succ i)
i✝ : Fin n
y : α✝ (succ i✝)
z : α✝ 0
α : Type u_1
a : Fin n → α
h : 1 * n = n
i : Fin n
⊢ repeat 1 a (↑(cast (_ : n = 1 * n)) i) = (a ∘ ↑(cast h)) (↑(cast (_ : n = 1 * n)) i)