Skip to content

[Merged by Bors] - chore: remove nonterminal simp#7580

Closed
BoltonBailey wants to merge 46 commits intomasterfrom
BoltonBailey/nonterminal-simp-w-brackets-removal-squad
Closed

[Merged by Bors] - chore: remove nonterminal simp#7580
BoltonBailey wants to merge 46 commits intomasterfrom
BoltonBailey/nonterminal-simp-w-brackets-removal-squad

Conversation

@BoltonBailey
Copy link
Copy Markdown
Collaborator

@BoltonBailey BoltonBailey commented Oct 9, 2023

Removes nonterminal simps on lines looking like simp [...]


Open in Gitpod

@BoltonBailey
Copy link
Copy Markdown
Collaborator Author

Lean 4 issue 2131 seems like it would make this easier, since I am currently trying to fix these by hand.

@ghost ghost added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Oct 10, 2023
@ghost ghost removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Oct 15, 2023
@ghost
Copy link
Copy Markdown

ghost commented Oct 15, 2023

BoltonBailey and others added 4 commits October 15, 2023 03:12
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
BoltonBailey and others added 2 commits October 15, 2023 03:13
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
have : IntFractPair.stream v (n + 1) = some (IntFractPair.of ifp_n.fr⁻¹) := by
cases ifp_n
simp [IntFractPair.stream, stream_nth_eq, nth_fr_ne_zero]
simp only [IntFractPair.stream, Nat.add_eq, add_zero, stream_nth_eq, Option.some_bind, ite_eq_right_iff]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[lint-style] reported by reviewdog 🐶

Suggested change
simp only [IntFractPair.stream, Nat.add_eq, add_zero, stream_nth_eq, Option.some_bind, ite_eq_right_iff]
simp only [IntFractPair.stream, Nat.add_eq, add_zero, stream_nth_eq, Option.some_bind, ite_eq_right_iff]

have : IntFractPair.stream v (n + 1) = some (IntFractPair.of ifp_n.fr⁻¹) := by
cases ifp_n
simp [IntFractPair.stream, stream_nth_eq, nth_fr_ne_zero]
simp only [IntFractPair.stream, Nat.add_eq, add_zero, stream_nth_eq, Option.some_bind, ite_eq_right_iff]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[lint-style] reported by reviewdog 🐶

Suggested change
simp only [IntFractPair.stream, Nat.add_eq, add_zero, stream_nth_eq, Option.some_bind, ite_eq_right_iff]
simp only [IntFractPair.stream, Nat.add_eq, add_zero, stream_nth_eq, Option.some_bind,
ite_eq_right_iff]

simp at hj
dsimp [σ, δ, Fin.predAbove, Fin.succAbove]
simp [Fin.lt_iff_val_lt_val, Fin.ite_val, Fin.dite_val]
simp only [Fin.lt_iff_val_lt_val, Fin.dite_val, Fin.ite_val, Fin.coe_pred, ge_iff_le, Fin.coe_castLT, dite_eq_ite]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[lint-style] reported by reviewdog 🐶

Suggested change
simp only [Fin.lt_iff_val_lt_val, Fin.dite_val, Fin.ite_val, Fin.coe_pred, ge_iff_le, Fin.coe_castLT, dite_eq_ite]
simp only [Fin.lt_iff_val_lt_val, Fin.dite_val, Fin.ite_val, Fin.coe_pred, ge_iff_le,
Fin.coe_castLT, dite_eq_ite]

simp at H hk
dsimp [σ, Fin.predAbove]
simp [Fin.lt_iff_val_lt_val, Fin.ite_val]
simp only [Fin.lt_iff_val_lt_val, Fin.ite_val, Fin.coe_pred, ge_iff_le, dite_eq_ite, Fin.coe_castLT]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[lint-style] reported by reviewdog 🐶

Suggested change
simp only [Fin.lt_iff_val_lt_val, Fin.ite_val, Fin.coe_pred, ge_iff_le, dite_eq_ite, Fin.coe_castLT]
simp only [Fin.lt_iff_val_lt_val, Fin.ite_val, Fin.coe_pred, ge_iff_le, dite_eq_ite,
Fin.coe_castLT]

· rw [dist_self_sub_left]
refine' (add_le_add_left (pi_norm_const_le <| 3 / 4 * δ) _).trans_eq _
simp [abs_of_pos, abs_of_pos hδ]
simp only [norm_mul, norm_div, Real.norm_eq_abs, gt_iff_lt, zero_lt_three, abs_of_pos, zero_lt_four, abs_of_pos hδ]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[lint-style] reported by reviewdog 🐶

Suggested change
simp only [norm_mul, norm_div, Real.norm_eq_abs, gt_iff_lt, zero_lt_three, abs_of_pos, zero_lt_four, abs_of_pos hδ]
simp only [norm_mul, norm_div, Real.norm_eq_abs, gt_iff_lt, zero_lt_three, abs_of_pos,
zero_lt_four, abs_of_pos hδ]

⟨r • ‖y - x‖⁻¹ • (y - x) + x, _⟩⟩
have : ‖y - x‖ ≠ 0 := by simpa [sub_eq_zero]
simp [norm_smul, this, Real.norm_of_nonneg hr]
simp only [mem_sphere_iff_norm, add_sub_cancel, norm_smul, Real.norm_eq_abs, norm_inv, norm_norm, ne_eq, norm_eq_zero]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[lint-style] reported by reviewdog 🐶

Suggested change
simp only [mem_sphere_iff_norm, add_sub_cancel, norm_smul, Real.norm_eq_abs, norm_inv, norm_norm, ne_eq, norm_eq_zero]
simp only [mem_sphere_iff_norm, add_sub_cancel, norm_smul, Real.norm_eq_abs, norm_inv, norm_norm,
ne_eq, norm_eq_zero]

rw [toList, hc.cycleOf_eq (mem_support.mp _), hs, card_toFinset, dedup_eq_self.mpr hn]
· refine' ext_get (by simp) fun k hk hk' => _
simp [formPerm_pow_apply_nthLe _ hn, Nat.mod_eq_of_lt hk']
simp only [Nat.zero_eq, get_map, get_range, formPerm_pow_apply_nthLe _ hn, zero_add, Nat.mod_eq_of_lt hk']
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[lint-style] reported by reviewdog 🐶

Suggested change
simp only [Nat.zero_eq, get_map, get_range, formPerm_pow_apply_nthLe _ hn, zero_add, Nat.mod_eq_of_lt hk']
simp only [Nat.zero_eq, get_map, get_range, formPerm_pow_apply_nthLe _ hn, zero_add,
Nat.mod_eq_of_lt hk']

theorem coeFn_add (μ ν : FiniteMeasure Ω) : (⇑(μ + ν) : Set Ω → ℝ≥0) = (⇑μ + ⇑ν : Set Ω → ℝ≥0) := by
funext
simp [← ENNReal.coe_eq_coe]
simp only [Pi.add_apply, ← ENNReal.coe_eq_coe, ne_eq, ennreal_coeFn_eq_coeFn_toMeasure, ENNReal.coe_add]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[lint-style] reported by reviewdog 🐶

Suggested change
simp only [Pi.add_apply, ← ENNReal.coe_eq_coe, ne_eq, ennreal_coeFn_eq_coeFn_toMeasure, ENNReal.coe_add]
simp only [Pi.add_apply, ← ENNReal.coe_eq_coe, ne_eq, ennreal_coeFn_eq_coeFn_toMeasure,
ENNReal.coe_add]

(⇑(c • μ) : Set Ω → ℝ≥0) = c • (⇑μ : Set Ω → ℝ≥0) := by
funext
simp [← ENNReal.coe_eq_coe, ENNReal.coe_smul]
simp only [Pi.smul_apply, ← ENNReal.coe_eq_coe, ne_eq, ennreal_coeFn_eq_coeFn_toMeasure, ENNReal.coe_smul]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[lint-style] reported by reviewdog 🐶

Suggested change
simp only [Pi.smul_apply, ← ENNReal.coe_eq_coe, ne_eq, ennreal_coeFn_eq_coeFn_toMeasure, ENNReal.coe_smul]
simp only [Pi.smul_apply, ← ENNReal.coe_eq_coe, ne_eq, ennreal_coeFn_eq_coeFn_toMeasure,
ENNReal.coe_smul]

BoltonBailey and others added 7 commits October 15, 2023 03:25
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Oct 17, 2023
…lib4 into BoltonBailey/nonterminal-simp-w-brackets-removal-squad
@ghost ghost removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Oct 18, 2023
Co-authored-by: Joël Riou <37772949+joelriou@users.noreply.github.com>
@adomani
Copy link
Copy Markdown
Contributor

adomani commented Oct 18, 2023

LGTM! I am sorry to have caused so much pain, but I think that this is a strong improvement!

I agree with the comment that ideally the linter should be implemented in lean directly, but currently, this is what is available!

Thanks!

@BoltonBailey
Copy link
Copy Markdown
Collaborator Author

LGTM! I am sorry to have caused so much pain, but I think that this is a strong improvement!

I agree with the comment that ideally the linter should be implemented in lean directly, but currently, this is what is available!

Thanks!

What doesn't kill you makes you stronger!

@joelriou
Copy link
Copy Markdown
Contributor

Thanks!

bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Oct 19, 2023
bors bot pushed a commit that referenced this pull request Oct 19, 2023
Removes nonterminal simps on lines looking like `simp [...]`
@bors
Copy link
Copy Markdown

bors bot commented Oct 19, 2023

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title chore: remove nonterminal simp [Merged by Bors] - chore: remove nonterminal simp Oct 19, 2023
@bors bors bot closed this Oct 19, 2023
@bors bors bot deleted the BoltonBailey/nonterminal-simp-w-brackets-removal-squad branch October 19, 2023 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants