Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different renaming in binport vs. synport #97

Closed
gebner opened this issue Jan 20, 2022 · 2 comments
Closed

Different renaming in binport vs. synport #97

gebner opened this issue Jan 20, 2022 · 2 comments

Comments

@gebner
Copy link
Member

gebner commented Jan 20, 2022

Apparently it's CategoryTheory.Bundled in binport, but CategoryTheory.bundled in synport.

-- Mathbin/CategoryTheory/ConcreteCategory/Bundled.lean
structure bundled (c : Type u → Type v) : Type max (u + 1) v where
  α : Type u
  str : c α := by
    run_tac
      tactic.apply_instance

-- Mathbin/MeasureTheory/Category/Meas.lean
def Meas : Type (u + 1) :=
  bundled MeasurableSpace -- ■ unknown identifier 'bundled'
@dselsam
Copy link
Collaborator

dselsam commented Jan 20, 2022

This issue is related to #58. The following line in synport is problematic: https://github.com/leanprover-community/mathport/blob/master/Mathport/Syntax/Translate/Basic.lean#L163. We need to take the namespace and open declarations into account somehow. It may not be easy in general to infer what the name would have resolved to in Lean3, but in the common case checking the binported term against the possible capitalizations will return only one compatible option. We can do the same (heuristic) trick for field names as well.

@gebner
Copy link
Member Author

gebner commented Jan 20, 2022

It may not be easy in general to infer what the name would have resolved to in Lean3

We could store the resolved name in the AST files (it's already known at parsing time in most cases).

@dselsam dselsam closed this as completed in 61b4659 Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants