Skip to content

feat: partial sections for Filter.Product - #42455

Open
plp127 wants to merge 16 commits into
leanprover-community:masterfrom
plp127:aliu/product-germ
Open

feat: partial sections for Filter.Product#42455
plp127 wants to merge 16 commits into
leanprover-community:masterfrom
plp127:aliu/product-germ

Conversation

@plp127

@plp127 plp127 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Change the definition of Filter.Product to only use partial functions defined in some neighborhood of l. This is mathematically the correct definition, and differs from the previous definition in that with the previous definition IsEmpty (l.Product ε) ↔ ∃ x : α, IsEmpty (ε x) but with the new definition IsEmpty (l.Product ε) ↔ ∃ᶠ x in l, IsEmpty (ε x). See Zulip. See also #36763.


Open in Gitpod

@github-actions github-actions Bot added the tech debt Tracking cross-cutting technical debt, see e.g. the "Technical debt counters" stream on zulip label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

PR summary 4ccea1f1a1

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.ModelTheory.Ultraproducts 752 753 +1 (+0.13%)
Import changes for all files
Files Import difference
10 files Mathlib.FieldTheory.AxGrothendieck Mathlib.ModelTheory.Algebra.Field.IsAlgClosed Mathlib.ModelTheory.Complexity Mathlib.ModelTheory.Equivalence Mathlib.ModelTheory.Graph Mathlib.ModelTheory.Order Mathlib.ModelTheory.Satisfiability Mathlib.ModelTheory.Topology.Types Mathlib.ModelTheory.Types Mathlib.ModelTheory.Ultraproducts
1

Declarations diff (regex)

+ Germ.{u,
+ Product.{u,
+ boundedFormulaRealize_ofPartialFun
+ coe_inf
+ coe_sup
+ formulaRealize_ofPartialFun
+ funMap_ofPartialFun
+ inductionOnPartialFun
+ instance [(x : α) → Nonempty (ε x)] : Nonempty (l.Product ε)
+ instance [Subsingleton β] : Subsingleton (Germ l β)
+ instance [l.NeBot] [Nontrivial β] : Nontrivial (Germ l β)
+ instance [l.NeBot] [∀ x, Nontrivial (ε x)] : Nontrivial (l.Product ε)
+ instance [∀ x, Subsingleton (ε x)] : Subsingleton (l.Product ε)
+ isConstant_iff_exists
+ isEmpty_iff
+ liftOfPartialFun
+ liftOfPartialFun_ofPartialFun
+ liftOn_coe
+ liftOn_ofFun
+ liftPred_iff_map_eq_const_true
+ liftRel_eq_iff
+ liftRel_iff_map₂_eq_const_true
+ nonempty_iff
+ nontrivial_iff
+ ofFun_def
+ ofFun_eq_iff
+ ofFun_eq_ofPartialFun
+ ofPartialFun
+ ofPartialFun_eq_iff
+ ofPartialFun_eq_of_subset
+ relMap_ofPartialFun
+ subsingleton
+ subsingleton_iff
+ subsingleton_of_bot
+ termRealize_ofPartialFun
++- liftOn
+-+ ofFun
- Germ
- Product
- Product.instNonempty
- germSetoid
- instNontrivial
- mk'_eq_coe
- quot_mk_eq_coe
-++ inductionOn

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 4ccea1f).

  • +39 new declarations
  • −7 removed declarations
+Filter.Germ.coe_inf
+Filter.Germ.coe_sup
-Filter.Germ.instNontrivial
+Filter.Germ.instNontrivialOfNeBot
+Filter.Germ.instSubsingleton
+Filter.Germ.isConstant_iff_exists
+Filter.Germ.liftOn.congr_simp
+Filter.Germ.liftOn_coe
+Filter.Germ.liftPred_iff_map_eq_const_true
+Filter.Germ.liftRel_eq_iff
+Filter.Germ.liftRel_iff_map₂_eq_const_true
-Filter.Germ.mk'_eq_coe
-Filter.Germ.quot_mk_eq_coe
+Filter.Germ.subsingleton_of_bot
+Filter.Product.inductionOn
+Filter.Product.inductionOnPartialFun
+Filter.Product.instNonempty
+Filter.Product.instNontrivialOfNeBot
+Filter.Product.instSubsingleton
+Filter.Product.isEmpty_iff
+Filter.Product.liftOfPartialFun
+Filter.Product.liftOfPartialFun.congr_simp
+Filter.Product.liftOfPartialFun_ofPartialFun
+Filter.Product.liftOn
+Filter.Product.liftOn_ofFun
+Filter.Product.nonempty_iff
+Filter.Product.nontrivial_iff
+Filter.Product.ofFun
+Filter.Product.ofFun_def
+Filter.Product.ofFun_eq_iff
+Filter.Product.ofFun_eq_ofPartialFun
+Filter.Product.ofPartialFun
+Filter.Product.ofPartialFun.congr_simp
+Filter.Product.ofPartialFun_eq_iff
+Filter.Product.ofPartialFun_eq_of_subset
+Filter.Product.subsingleton
+Filter.Product.subsingleton_iff
-Filter.germSetoid
-Filter.productSetoid
-FirstOrder.Language.Ultraproduct.Product.instNonempty
+FirstOrder.Language.Ultraproduct.boundedFormulaRealize_ofPartialFun
+FirstOrder.Language.Ultraproduct.formulaRealize_ofPartialFun
+FirstOrder.Language.Ultraproduct.funMap_ofPartialFun
+FirstOrder.Language.Ultraproduct.relMap_ofPartialFun
-FirstOrder.Language.Ultraproduct.setoidPrestructure
+FirstOrder.Language.Ultraproduct.termRealize_ofPartialFun

Decrease in strong tech debt: (relative, absolute) = (1.00, 0.00)
Current number Change Type (strong)
498 -1 erw
Decrease in weak tech debt: (relative, absolute) = (1.00, 0.00)
Current number Change Type (weak)
5046 -1 exposed public sections

Current commit 4ccea1f1a1
Reference commit 9c0c555bde

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).

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

Labels

tech debt Tracking cross-cutting technical debt, see e.g. the "Technical debt counters" stream on zulip

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant