Skip to content

feat(Logic/Relation): some EqvGen API#40626

Open
chenson2018 wants to merge 9 commits into
leanprover-community:masterfrom
chenson2018:eqvgen-api
Open

feat(Logic/Relation): some EqvGen API#40626
chenson2018 wants to merge 9 commits into
leanprover-community:masterfrom
chenson2018:eqvgen-api

Conversation

@chenson2018

Copy link
Copy Markdown
Contributor

This is adapted from #40606 and existing lemmas in CSLib. I move two theorems (Equivalence.eqvGen_iff and Equivalence.eqvGen_eq) earlier for a better proof of EqvGen.lift' that matches what is done for other closures.

Co-authored-by: Dagur Asgeirsson dagurtomas@gmail.com


Open in Gitpod

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

PR summary 4072bec448

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ _root_.Equivalence.eqvGen_eq
+ _root_.Equivalence.eqvGen_iff
+ _root_.Relation.eqvGen_idem
+ _root_.Relation.reflTransGen_eq_eqvGen
+ _root_.Relation.reflTransGen_le_eqvGen
+ _root_.Relation.transGen_le_eqvGen
+ lift
+ lift'
+ reflGen_le_eqvGen
+ symmGen_le_eqvGen
++++ to_eqvGen
- Equivalence.eqvGen_eq
- Equivalence.eqvGen_iff

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

Lean-aware diff — post-build, computed from the Lean environment (commit 4072bec).

  • +12 new declarations
  • −0 removed declarations
+Relation.EqvGen.lift
+Relation.EqvGen.lift'
+Relation.ReflGen.to_eqvGen
+Relation.ReflTransGen.to_eqvGen
+Relation.SymmGen.to_eqvGen
+Relation.TransGen.to_eqvGen
+Relation.eqvGen_idem
+Relation.reflGen_le_eqvGen
+Relation.reflTransGen_eq_eqvGen
+Relation.reflTransGen_le_eqvGen
+Relation.symmGen_le_eqvGen
+Relation.transGen_le_eqvGen

No changes to strong technical debt.

No changes to weak technical debt.

Current commit 4072bec448
Reference commit f3853dcbb5

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/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).

@github-actions github-actions Bot added the t-logic Logic (model theory, etc) label Jun 15, 2026
theorem _root_.Equivalence.eqvGen_eq (h : Equivalence r) : EqvGen r = r :=
funext fun _ ↦ funext fun _ ↦ propext <| h.eqvGen_iff

theorem _root_.Relation.eqvGen_idem : EqvGen (EqvGen r) = EqvGen r :=

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Please see #40606 (comment) for previous discussion on this theorem.

Comment thread Mathlib/Logic/Relation.lean Outdated
@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 Jul 1, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

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

@github-actions github-actions 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 Jul 3, 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 Jul 6, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) t-logic Logic (model theory, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants