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

lift tactic does not respect abbreviations #15865

Open
jcommelin opened this issue Aug 16, 2024 · 4 comments
Open

lift tactic does not respect abbreviations #15865

jcommelin opened this issue Aug 16, 2024 · 4 comments
Labels
bug Something isn't working t-meta Tactics, attributes or user commands

Comments

@jcommelin
Copy link
Member

jcommelin commented Aug 16, 2024

import Mathlib.Tactic.Lift

abbrev MyNat := ℕ

example (n : ℤ) (hn : n ≥ 0) : True := by
  lift n to MyNat using hn
  -- type of `n` is `ℕ` instead of `MyNat`, in the goal state
  trivial

This means that we can not use dot-notation on n for all the juicy decls in the MyNat namespace.

A concrete example of this is LieIdeal K L which is an abbreviation of LieSubmodule K L L.

@jcommelin jcommelin added bug Something isn't working t-meta Tactics, attributes or user commands labels Aug 16, 2024
@mattrobball
Copy link
Collaborator

lift seems to explicitly hard code use of Type. How is this being used for universe polymorphic types like LieSubmodule?

@mattrobball
Copy link
Collaborator

Similar problem with ENat, WithTop, and Option.

@urkud
Copy link
Member

urkud commented Sep 7, 2024

ENat and WithTop aren't abbrevs, so lift shouldn't see through it.

@urkud
Copy link
Member

urkud commented Sep 7, 2024

lift seems to explicitly hard code use of Type. How is this being used for universe polymorphic types like LieSubmodule?

https://leanprover-community.github.io/mathlib4_docs/Mathlib/Algebra/Group/Submonoid/Membership.html#list_prod_mem uses lift but is universe polymorphic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working t-meta Tactics, attributes or user commands
Projects
None yet
Development

No branches or pull requests

3 participants