leanprover-community / mathlib

  • Home
  • Zulip archive
  • API documentation
  • Lean web editor
  • Links

Zulip Chat Archive

Stream: new members

Topic: Changing type of a variable from \Z to \N


Michael Wahlberg (Feb 23 2023 at 16:13):

Is there a way to change the variable type inside a function from \Z to \N?

  if x < 0 then
    (x + b)
  else
    x

Alex J. Best (Feb 23 2023 at 16:26):

im not 100% sure what you are asking, but maybe tactic#lift

Kyle Miller (Feb 23 2023 at 16:30):

Maybe docs#int.to_nat would be helpful


Last updated: May 02 2025 at 03:31 UTC

Theme Simple by wildflame © 2016 Powered by jekyll