You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a K function symbol production is marked total, the corresponding Lean definition should not have Option as its result type.
The key to this is generating theorem stubs that can be used to show absurdity of certain cases.
For the main def, it should be proved that alt least one of the rules apply. For a rule def, each application of a non-total function induces an obligation to prove definedness.
Motivating example:
defdiv (x y : Nat) : Option Nat := ...
theoremdiv_x_2_ne_none (x : Nat) : div x 2 ≠ none := sorrydefhalve (x : Nat) : Nat :=
match h0 : div x 2with
| some res => res
| none => absurd h0 (div_x_2_ne_none x)
The text was updated successfully, but these errors were encountered:
Related
If a
K
function symbol production is markedtotal
, the corresponding Lean definition should not haveOption
as its result type.The key to this is generating theorem stubs that can be used to show absurdity of certain cases.
For the main
def
, it should be proved that alt least one of the rules apply. For a ruledef
, each application of a non-total
function induces an obligation to prove definedness.Motivating example:
The text was updated successfully, but these errors were encountered: