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
Could we replace the use of patternFailure axioms on value declarations:
Definition x := match [1; 2; 3] with (x :: l) => x
| _ => patternFailure
end .
Definition l := match [1; 2; 3] with (x :: l) => l
| _ => patternFailure
end .
by
Definition x := match [1;2;3] as l return l <> [] -> nat with
| x :: _ => fun _ => x
| _ => fun H => match H eq_refl with end end.
Definition l := match [1;2;3] as l1 return l1 <> [] -> list nat with
| _ :: l => fun _ => l
| _ => fun H => match H eq_refl with end end.
Compute x.
Compute l.
??
Notice that x and l have different types in the first and second examples.
The text was updated successfully, but these errors were encountered:
Could we replace the use of patternFailure axioms on value declarations:
by
??
Notice that
x
andl
have different types in the first and second examples.The text was updated successfully, but these errors were encountered: