refactor: change pset to a structure - #43976
Shreyas4991 wants to merge 6 commits into
Conversation
PR summary 08bc8e498aImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
|
!radar |
|
Benchmark results for d2cfb58 against 0acbe13 are in. No significant results found. @Shreyas4991 @eric-wieser
No significant changes detected. |
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
| @[pp_with_univ, use_set_notation_for_order] | ||
| inductive PSet : Type (u + 1) | ||
| | mk (α : Type u) (A : α → PSet) : PSet | ||
| @[pp_with_univ, use_set_notation_for_order, ext] |
There was a problem hiding this comment.
I'm not convinced ext is useful here; I'd suggest adding it in a later PR, and only if you have a proof that uses it.
| @[simp] | ||
| theorem mk_type (α A) : «Type» ⟨α, A⟩ = α := | ||
| rfl | ||
|
|
||
| @[simp] | ||
| theorem mk_func (α A) : Func ⟨α, A⟩ = A := | ||
| rfl | ||
|
|
||
| @[simp] | ||
| theorem eta : ∀ x : PSet, mk x.Type x.Func = x | ||
| | ⟨_, _⟩ => rfl |
There was a problem hiding this comment.
I think these should be kept but deprecated (and de-simped)
There was a problem hiding this comment.
`[deprecated]` attribute should specify either a new name or a deprecation message
there is no new name to specify
I was fiddling with ZFSets when I found that replacing PSets inductive definition with a structure simplified the file. Some proofs were using the wrong API lemmas. The new definition is as follows:
Zulip thread : https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/PSets.20as.20structures.3F/near/625458978