Skip to content

Commit

Permalink
Can now always coerce something that was coercible to a base field.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdoris committed Aug 20, 2018
1 parent cf4f4d2 commit 0960922
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions FldPad.mag
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,12 @@ intrinsic IsCoercible(F :: FldPadExact, X) -> BoolElt, .
return true, Y @ F`completion_map;
end if;
end if;
if not IsPrimeField(F) then
ok, Y := IsCoercible(BaseField(F), X);
if ok then
return true, F ! Y;
end if;
end if;
return false, "wrong type";
end intrinsic;

Expand Down

0 comments on commit 0960922

Please sign in to comment.