-
Notifications
You must be signed in to change notification settings - Fork 717
Description
Proposal
I propose to add the following two theorems to Init.Data.Fin.Lemmas:
@[simp] theorem forall_fin_zero {p : Fin 0 → Prop} : (∀ i, p i) ↔ True := ...
@[simp] theorem exists_fin_zero {p : Fin 0 → Prop} : (∃ i, p i) ↔ False := ...This file already contains similar theorems forall_fin_one, forall_fin_two, exists_fin_one, exists_fin_two. These four theorems should probably have attribute simp but this is not formally part of this RFC.
It is clear that these two theorems are handy to quickly deal with trivial situations. The necessity for these two theorems hasn't been apparent since Mathlib has IsEmpty.forall_iff and IsEmpty.exists_iff as simp lemmas. Unfortunately, the former triggers on every ∀ _, _ statement, which is a bad idea for simp. This needs to be corrected. The two theorems proposed here will help with that effort by reducing the amount of breakage when the simp attribute is removed from IsEmpty.forall_iff and IsEmpty.exists_iff.
The tentative PR #10627 which implements this has no consequences in Lean. The tentative port in Batteries PR batteries#1433 causes no downstream issues in Batteries nor Mathlib. There seems to be no negative consequences to adding the two proposed theorems.
Impact
Add 👍 to issues you consider important. If others benefit from the changes in this proposal being added, please ask them to add 👍 to it.