Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat: Pairwise and composition with an equiv #10706

Closed
wants to merge 4 commits into from

Conversation

jsm28
Copy link
Collaborator

@jsm28 jsm28 commented Feb 18, 2024

Add a lemma about Pairwise being preserved by composing the arguments of the pairwise relation with an equiv.

lemma EquivLike.pairwise_comp_iff {X : Type*} {Y : Type*} {F} [EquivLike F Y X]
    (f : F) (p : X → X → Prop) : Pairwise (fun y z ↦ p (f y) (f z)) ↔ Pairwise p := by

This depends on Mathlib.Data.FunLike.Equiv and
Mathlib.Logic.Pairwise, neither of which imports the other, so to avoid increasing the imports of very basic files I put it in its own new file, but feel free to suggest a better location of this lemma (and to golf the proof).

From AperiodicMonotilesLean.


Open in Gitpod

Add a lemma about `Pairwise` being preserved by composing the
arguments of the pairwise relation with an equiv.

```lean
lemma EquivLike.pairwise_comp_iff {X : Type*} {Y : Type*} {F} [EquivLike F Y X]
    (f : F) (p : X → X → Prop) : Pairwise (fun y z ↦ p (f y) (f z)) ↔ Pairwise p := by
```

This depends on `Mathlib.Data.FunLike.Equiv` and
`Mathlib.Logic.Pairwise`, neither of which imports the other, so to
avoid increasing the imports of very basic files I put it in its own
new file, but feel free to suggest a better location of this lemma
(and to golf the proof).

From AperiodicMonotilesLean.
@jsm28 jsm28 added the awaiting-review The author would like community review of the PR label Feb 18, 2024
@jsm28
Copy link
Collaborator Author

jsm28 commented Feb 19, 2024

To consider in review: do we also want variants for unbundled bijective functions, and one-way implications for unbundled injective and surjective functions and for EmbeddingLike, and where should all those variants go if so?

@jsm28
Copy link
Collaborator Author

jsm28 commented Feb 20, 2024

I've now added the lemmas for unbundled functions (in Mathlib.Logic.Pairwise, since they don't have any further dependencies), and one for EmbeddingLike (in the same new file as the EquivLike one; the question about the best locations still applies there, for both lemmas, and quite likely the two belong in different files). I've also used Function.Surjective.forall₂ for golfing as suggested.

Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Thanks 🎉

bors merge

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review The author would like community review of the PR labels Mar 26, 2024
mathlib-bors bot pushed a commit that referenced this pull request Mar 26, 2024
Add a lemma about `Pairwise` being preserved by composing the arguments of the pairwise relation with an equiv.

```lean
lemma EquivLike.pairwise_comp_iff {X : Type*} {Y : Type*} {F} [EquivLike F Y X]
    (f : F) (p : X → X → Prop) : Pairwise (fun y z ↦ p (f y) (f z)) ↔ Pairwise p := by
```

This depends on `Mathlib.Data.FunLike.Equiv` and
`Mathlib.Logic.Pairwise`, neither of which imports the other, so to avoid increasing the imports of very basic files I put it in its own new file, but feel free to suggest a better location of this lemma (and to golf the proof).

From AperiodicMonotilesLean.
@mathlib-bors
Copy link

mathlib-bors bot commented Mar 26, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: Pairwise and composition with an equiv [Merged by Bors] - feat: Pairwise and composition with an equiv Mar 26, 2024
@mathlib-bors mathlib-bors bot closed this Mar 26, 2024
@mathlib-bors mathlib-bors bot deleted the jsm28/equiv_pairwise_comp_iff branch March 26, 2024 11:02
Louddy pushed a commit that referenced this pull request Apr 15, 2024
Add a lemma about `Pairwise` being preserved by composing the arguments of the pairwise relation with an equiv.

```lean
lemma EquivLike.pairwise_comp_iff {X : Type*} {Y : Type*} {F} [EquivLike F Y X]
    (f : F) (p : X → X → Prop) : Pairwise (fun y z ↦ p (f y) (f z)) ↔ Pairwise p := by
```

This depends on `Mathlib.Data.FunLike.Equiv` and
`Mathlib.Logic.Pairwise`, neither of which imports the other, so to avoid increasing the imports of very basic files I put it in its own new file, but feel free to suggest a better location of this lemma (and to golf the proof).

From AperiodicMonotilesLean.
atarnoam pushed a commit that referenced this pull request Apr 16, 2024
Add a lemma about `Pairwise` being preserved by composing the arguments of the pairwise relation with an equiv.

```lean
lemma EquivLike.pairwise_comp_iff {X : Type*} {Y : Type*} {F} [EquivLike F Y X]
    (f : F) (p : X → X → Prop) : Pairwise (fun y z ↦ p (f y) (f z)) ↔ Pairwise p := by
```

This depends on `Mathlib.Data.FunLike.Equiv` and
`Mathlib.Logic.Pairwise`, neither of which imports the other, so to avoid increasing the imports of very basic files I put it in its own new file, but feel free to suggest a better location of this lemma (and to golf the proof).

From AperiodicMonotilesLean.
uniwuni pushed a commit that referenced this pull request Apr 19, 2024
Add a lemma about `Pairwise` being preserved by composing the arguments of the pairwise relation with an equiv.

```lean
lemma EquivLike.pairwise_comp_iff {X : Type*} {Y : Type*} {F} [EquivLike F Y X]
    (f : F) (p : X → X → Prop) : Pairwise (fun y z ↦ p (f y) (f z)) ↔ Pairwise p := by
```

This depends on `Mathlib.Data.FunLike.Equiv` and
`Mathlib.Logic.Pairwise`, neither of which imports the other, so to avoid increasing the imports of very basic files I put it in its own new file, but feel free to suggest a better location of this lemma (and to golf the proof).

From AperiodicMonotilesLean.
callesonne pushed a commit that referenced this pull request Apr 22, 2024
Add a lemma about `Pairwise` being preserved by composing the arguments of the pairwise relation with an equiv.

```lean
lemma EquivLike.pairwise_comp_iff {X : Type*} {Y : Type*} {F} [EquivLike F Y X]
    (f : F) (p : X → X → Prop) : Pairwise (fun y z ↦ p (f y) (f z)) ↔ Pairwise p := by
```

This depends on `Mathlib.Data.FunLike.Equiv` and
`Mathlib.Logic.Pairwise`, neither of which imports the other, so to avoid increasing the imports of very basic files I put it in its own new file, but feel free to suggest a better location of this lemma (and to golf the proof).

From AperiodicMonotilesLean.
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.

None yet

4 participants