Skip to content

[Merged by Bors] - feat: positivity extension for ite - #2273

Closed
YaelDillies wants to merge 4 commits into
masterfrom
positivity_ite
Closed

YaelDillies wants to merge 4 commits into
masterfrom
positivity_ite

Conversation

@YaelDillies

Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies added help-wanted The author needs attention to resolve issues mathlib3-pair This PR is a forward-port of a mathlib3 PR or part of one, either under review or recently merged t-meta Tactics, attributes or user commands labels Feb 14, 2023

@YaelDillies YaelDillies left a comment

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.

Help wanted!

Comment thread Mathlib/Tactic/Positivity/Basic.lean Outdated
Comment on lines +52 to +53
let .app (.app (.app f (p : Q(Prop))) (a : Q($α))) (b : Q($α)) ← withReducible (whnf e)
| throwError "not ite"

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.

I think I messed up this pattern-matching, but I can't figure out how to fix it. @digama0, would you enlighten me?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This needed an additional .app, to pick up the Decidable instance.

Comment thread Mathlib/Tactic/Positivity/Basic.lean Outdated
let .app (.app (.app f (p : Q(Prop))) (a : Q($α))) (b : Q($α)) ← withReducible (whnf e)
| throwError "not ite"
let ra ← core zα pα a; let rb ← core zα pα b
let _a ← synthInstanceQ (q(Preorder $α) : Q(Type u))

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.

Synthesizing Preorder α that early means the extension is less general than its Lean 3 counterpart. Should I/can I move this line into each branch of the big ra, rb pattern-match, with an appropriate tweak to this instance I ask synthesis of?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I went ahead and pushed the synthInstanceQ call into the branches that needed it.

@dwrensha dwrensha added awaiting-review and removed help-wanted The author needs attention to resolve issues labels Jun 28, 2023
@kim-em

kim-em commented Jun 30, 2023

Copy link
Copy Markdown
Contributor

bors merge

@github-actions github-actions Bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Jun 30, 2023
bors Bot pushed a commit that referenced this pull request Jun 30, 2023
@bors

bors Bot commented Jun 30, 2023

Copy link
Copy Markdown

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors Bot changed the title feat: positivity extension for ite [Merged by Bors] - feat: positivity extension for ite Jun 30, 2023
@bors bors Bot closed this Jun 30, 2023
@bors
bors Bot deleted the positivity_ite branch June 30, 2023 03:05
kbuzzard pushed a commit that referenced this pull request Jul 6, 2023
kim-em pushed a commit that referenced this pull request Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mathlib3-pair This PR is a forward-port of a mathlib3 PR or part of one, either under review or recently merged ready-to-merge This PR has been sent to bors. t-meta Tactics, attributes or user commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants