Skip to content

feat: generalize HasCompl.compl image/preimage lemmas to Involutive#34040

Open
Ruben-VandeVelde wants to merge 1 commit intoleanprover-community:masterfrom
Ruben-VandeVelde:more-image
Open

feat: generalize HasCompl.compl image/preimage lemmas to Involutive#34040
Ruben-VandeVelde wants to merge 1 commit intoleanprover-community:masterfrom
Ruben-VandeVelde:more-image

Conversation

@Ruben-VandeVelde
Copy link
Contributor


Open in Gitpod

@github-actions github-actions bot added the t-data Data (lists, quotients, numbers, etc) label Jan 16, 2026
@github-actions
Copy link

PR summary 26299a5af4

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ Involutive.image_image
+ _root_.Function.Involutive.mem_image_iff

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

theorem Involutive.image_image {f : α → α} (hf : f.Involutive) (s : Set α) :
f '' (f '' s) = s :=
hf.leftInverse.image_image s

Copy link
Member

Choose a reason for hiding this comment

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

Could you also add

protected theorem Involutive.image {f : α → α} (hf : Involutive f) : Involutive (image f)

theorem LeftInverse.image_image {g : β → α} (h : LeftInverse g f) (s : Set α) :
g '' (f '' s) = s := by rw [← image_comp, h.comp_eq_id, image_id]

theorem Involutive.image_image {f : α → α} (hf : f.Involutive) (s : Set α) :
Copy link
Member

Choose a reason for hiding this comment

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

Do we want preimage_preimage too?

compl_involutive.image_image s

theorem preimage_compl_eq_image_compl : Compl.compl ⁻¹' s = Compl.compl '' s :=
congr_fun (compl_involutive.image_eq_preimage_symm).symm s
Copy link
Member

Choose a reason for hiding this comment

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

I think we should provide both the applied and unapplied versions for both Compl.compl and Involutive. I suppose the unapplied one can be primed.

I think a good argument for having the applied one is that it is easily loogle-able.

@joneugster joneugster assigned eric-wieser and unassigned TwoFX Jan 30, 2026
@joneugster joneugster added the awaiting-author A reviewer has asked the author a question or requested changes. label Jan 30, 2026
@mathlib-merge-conflicts mathlib-merge-conflicts bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Feb 18, 2026
@mathlib-merge-conflicts
Copy link

This pull request has conflicts, please merge master and resolve them.

@mathlib-merge-conflicts mathlib-merge-conflicts bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-author A reviewer has asked the author a question or requested changes. t-data Data (lists, quotients, numbers, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants