We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please put an X between the brackets as you perform the following steps:
Pow doesn't do type coercion whereas Sub does.
Could be related to this pull request: #2778
inductive TestType | a (value : Float) deriving Repr instance : Coe Float TestType where coe x := TestType.a x instance : Coe TestType Float where coe x := let (TestType.a value) := x value instance : HomogeneousPow TestType where pow := let pow x y := let (TestType.a value1) := x let (TestType.a value2) := y TestType.a (value1 ^ value2) pow #eval ((2. : Float) : TestType) ^ ((2. : Float) : TestType) -- `TestType.a 4.000000` #eval ((2. : Float) : TestType) ^ ((2. : Float)) -- failed to synthesize HPow TestType Float #eval ((2. : Float)) ^ ((2. : Float) : TestType) -- failed to synthesize HPow TestType Float
Expected behavior:
#eval ((2. : Float) : TestType) ^ ((2. : Float)) -- should return `TestType.a 4.000000`
Actual behavior:
#eval ((2. : Float) : TestType) ^ ((2. : Float)) -- failed to synthesize HPow TestType Float
using live.lean-lang.org, lean version 4.10.0-rc1
None
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Prerequisites
Please put an X between the brackets as you perform the following steps:
https://github.com/leanprover/lean4/issues
Avoid dependencies to Mathlib or Batteries.
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)
Description
Pow doesn't do type coercion whereas Sub does.
Context
Could be related to this pull request: #2778
Steps to Reproduce
Expected behavior:
Actual behavior:
Versions
using live.lean-lang.org, lean version 4.10.0-rc1
Additional Information
None
Impact
Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered: