Skip to content

[Merged by Bors] - feat: port Data.QPF.Multivariate.Constructions.Cofix#2444

Closed
alexkeizer wants to merge 20 commits intomasterfrom
port/Data.Qpf.Multivariate.Constructions.Cofix
Closed

[Merged by Bors] - feat: port Data.QPF.Multivariate.Constructions.Cofix#2444
alexkeizer wants to merge 20 commits intomasterfrom
port/Data.Qpf.Multivariate.Constructions.Cofix

Conversation

@alexkeizer
Copy link
Copy Markdown
Collaborator


Open in Gitpod

@alexkeizer alexkeizer added WIP Work in progress mathlib-port This is a port of a theory file from mathlib. help-wanted The author needs attention to resolve issues labels Feb 22, 2023
@alexkeizer
Copy link
Copy Markdown
Collaborator Author

Everything is ported, except for a bisimulation tactic that is also defined in this file. I'm not really sure how to deal with that, I don't really know how to read the Lean 3 tactic code, so help would be appreciated.

@Ruben-VandeVelde Ruben-VandeVelde force-pushed the port/Data.Qpf.Multivariate.Constructions.Cofix branch from 93ec198 to 15fbc40 Compare April 10, 2023 19:52
@Ruben-VandeVelde
Copy link
Copy Markdown
Contributor

Now needs help with a universe issue:

stuck at solving universe constraint
  max u ?u.141339 =?= u
while trying to unify
  (TypeVec (n + 1) → Type (max ?u.141339 u)) (n + 1) → TypeVec (n + 1) → Type (max ?u.141339 u)
with
  (TypeVec (n + 1) → Type u) (n + 1) → Type u

@alexkeizer
Copy link
Copy Markdown
Collaborator Author

alexkeizer commented Apr 11, 2023

Now needs help with a universe issue:

stuck at solving universe constraint
  max u ?u.141339 =?= u
while trying to unify
  (TypeVec (n + 1) → Type (max ?u.141339 u)) (n + 1) → TypeVec (n + 1) → Type (max ?u.141339 u)
with
  (TypeVec (n + 1) → Type u) (n + 1) → Type u

It seems something beyond just an universe issue. It's trying to apply (TypeVec (n + 1) → Type u) to (n + 1), which doesn't really make sense?

EDIT: Yes, the universe issue is resolved by giving explicit universes, but that just reveals more issues with the proof itself.

@kim-em kim-em added merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) labels Apr 18, 2023
Mathbin -> Mathlib
fix certain import statements
move "by" to end of line
add import to Mathlib.lean
@Ruben-VandeVelde Ruben-VandeVelde changed the title feat: Port/Data.Qpf.Multivariate.Constructions.Cofix feat: Port/Data.QPF.Multivariate.Constructions.Cofix May 23, 2023
@Ruben-VandeVelde Ruben-VandeVelde changed the title feat: Port/Data.QPF.Multivariate.Constructions.Cofix feat: port Data.QPF.Multivariate.Constructions.Cofix May 23, 2023
@Ruben-VandeVelde Ruben-VandeVelde force-pushed the port/Data.Qpf.Multivariate.Constructions.Cofix branch from 0c8652e to 40186be Compare May 23, 2023 18:13
@Komyyy Komyyy added awaiting-review awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. and removed help-wanted The author needs attention to resolve issues WIP Work in progress labels Jun 19, 2023
@Komyyy Komyyy marked this pull request as ready for review June 19, 2023 09:39
@Komyyy Komyyy added the t-meta Tactics, attributes or user commands label Jun 19, 2023
@Komyyy
Copy link
Copy Markdown
Contributor

Komyyy commented Jun 19, 2023

@alexkeizer @Ruben-VandeVelde
I've ported mv_bisim tactic.
(The implementation is extortionately messy. I hope that this is fixed.)

@github-actions github-actions bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Jun 19, 2023
@alexkeizer
Copy link
Copy Markdown
Collaborator Author

@Komyyy Thanks for picking this up! I'll try having a look at the tactic, but I'm having a bit of trouble to parse what exactly is going on. Since you ported it, I assume you have more of a clue, so if you could write some documentation explaining what the tactic does, I would really appreciate it

@Komyyy
Copy link
Copy Markdown
Contributor

Komyyy commented Jun 28, 2023

@alexkeizer
I've rewritten the tactic.
The implementation is improved and become "lean" much or less.
You needn't to fixed this tactic, thank you.

What mv_bisim e with R a b x Ha Hb do:

  1. generalize e = x.
  2. When goal is l[x] = r[x], Define R := fun a b => ∃ x, a = l[x] ∧ b = r[x].
  3. refine MvQPF.Cofix.bisim₂ R ?_ _ _ ⟨_, rfl, rfl⟩.
  4. rintro a b ⟨x, Ha, Hb⟩,.
  5. clear x

@Komyyy Komyyy added the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Jun 28, 2023
@kim-em
Copy link
Copy Markdown
Contributor

kim-em commented Jun 28, 2023

The tactic is fine. It's also only ever used in this file, which is a leaf anyway...

bors d+

@bors
Copy link
Copy Markdown

bors bot commented Jun 28, 2023

✌️ alexkeizer can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@github-actions github-actions bot added delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). and removed awaiting-review awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. labels Jun 28, 2023
@jcommelin
Copy link
Copy Markdown
Member

Thanks 🎉

bors merge

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Jul 3, 2023
bors bot pushed a commit that referenced this pull request Jul 3, 2023
Co-authored-by: Alex Keizer <alex@keizer.dev>
Co-authored-by: Komyyy <pol_tta@outlook.jp>
@bors
Copy link
Copy Markdown

bors bot commented Jul 3, 2023

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: port Data.QPF.Multivariate.Constructions.Cofix [Merged by Bors] - feat: port Data.QPF.Multivariate.Constructions.Cofix Jul 3, 2023
@bors bors bot closed this Jul 3, 2023
@bors bors bot deleted the port/Data.Qpf.Multivariate.Constructions.Cofix branch July 3, 2023 08:12
kbuzzard pushed a commit that referenced this pull request Jul 6, 2023
Co-authored-by: Alex Keizer <alex@keizer.dev>
Co-authored-by: Komyyy <pol_tta@outlook.jp>
kim-em pushed a commit that referenced this pull request Aug 14, 2023
Co-authored-by: Alex Keizer <alex@keizer.dev>
Co-authored-by: Komyyy <pol_tta@outlook.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). mathlib-port This is a port of a theory file from mathlib. 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.

5 participants