fact: Definition to_hexadecimal (n : IR) : option Hexadecimal.hexadecimal := match n with | IRZ z => match IZ_to_Z z with | Some z => Some (Hexadecimal.Hexadecimal (Z.to_hex_int z) Hexadecimal.Nil) | None => None end | IRQ (Qmake num den) => IQmake_to_hexadecimal num den | IRmult (IRZ z) (IRZ (IZpow_pos 2 e)) => match IZ_to_Z z with | Some z => Some (Hexadecimal.HexadecimalExp (Z.to_hex_int z) Hexadecimal.Nil (Pos.to_int e)) | None => None end | IRmult (IRQ (Qmake num den)) (IRZ (IZpow_pos 2 e)) => match IQmake_to_hexadecimal num den with | Some (Hexadecimal.Hexadecimal i f) => Some (Hexadecimal.HexadecimalExp i f (Pos.to_int e)) | _ => None end | IRdiv (IRZ z) (IRZ (IZpow_pos 2 e)) => match IZ_to_Z z with | Some z => Some (Hexadecimal.HexadecimalExp (Z.to_hex_int z) Hexadecimal.Nil (Decimal.Neg (Pos.to_uint e))) | None => None end | IRdiv (IRQ (Qmake num den)) (IRZ (IZpow_pos 2 e)) => match IQmake_to_hexadecimal num den with | Some (Hexadecimal.Hexadecimal i f) => Some (Hexadecimal.HexadecimalExp i f (Decimal.Neg (Pos.to_uint e))) | _ => None end | _ => None end.
imports: ZArith_base QArith_base ConstructiveCauchyReals ConstructiveCauchyRealsMult ConstructiveRcomplete ClassicalDedekindReals