Mathlib Map

Theorems · Definition · number theory

GenContFract.of

{K : Type u_1} → [inst : DivisionRing K] → [inst_1 : LinearOrder K] → [FloorRing K] → K → GenContFract K

Returns the GenContFract of a value. In fact, the returned gcf is also a ContFract that terminates if and only if v is rational (see Mathlib/Algebra/ContinuedFractions/Computation/TerminatesIffRat.lean). The continued fraction representation of v is given by [⌊v⌋; b₀, b₁, b₂,...], where [b₀; b₁, b₂,...] recursively is the continued fraction representation of 1 / (v - ⌊v⌋). This process stops when the fractional part v - ⌊v⌋ hits 0 at some step. The implementation uses IntFractPair.stream to obtain the partial denominators of the continued fraction. Refer to said function for more details about the computation process.

Defined in
Mathlib.Algebra.ContinuedFractions.Computation.Basic
Cited by
53 results in Mathlib
Foundations
Depth 49 from the axioms · uses propext, Classical.choice, Quot.sound
Assumes
DivisionRingLinearOrderFloorRing

Around this declaration

Dashed lines are statement dependencies; solid lines are citations in proofs.

GenContFract.of_terminatedAt_n_iff_succ_nth_intFractPair_stream_eq_none · cited by 5GenContFract.of_terminate…GenContFract.IntFractPair.exists_succ_get?_stream_of_gcf_of_get?_eq_some · cited by 4IntFractPair.exists_succ_…GenContFract.fib_le_of_contsAux_b · cited by 4GenContFract.fib_le_of_co…GenContFract.of_one_le_get?_partDen · cited by 4GenContFract.of_one_le_ge…GenContFract.of_partNum_eq_one · cited by 4GenContFract.of_partNum_e…GenContFract.get?_of_eq_some_of_succ_get?_intFractPair_stream · cited by 3GenContFract.get?_of_eq_s…GenContFract.of_correctness_of_terminatedAt · cited by 3GenContFract.of_correctne…GenContFract.of_partNum_eq_one_and_exists_int_partDen_eq · cited by 3GenContFract.of_partNum_e…GenContFract.abs_sub_convs_le · cited by 2GenContFract.abs_sub_conv…GenContFract.compExactValue_correctness_of_stream_eq_some · cited by 2GenContFract.compExactVal…GenContFract.exists_gcf_pair_rat_eq_nth_conts · cited by 2GenContFract.exists_gcf_p…GenContFract.le_of_succ_get?_den · cited by 2GenContFract.le_of_succ_g…GenContFract.of_h_eq_floor · cited by 2GenContFract.of_h_eq_floorGenContFract.of_s_head_aux · cited by 2GenContFract.of_s_head_auxGenContFract.of_s_of_int · cited by 2GenContFract.of_s_of_intLinearOrder · cited by 8572LinearOrderDivisionRing · cited by 1062DivisionRingFloorRing · cited by 405FloorRingStream'.Seq · cited by 226Stream'.SeqGenContFract · cited by 68GenContFractStream'.Seq1 · cited by 58Stream'.Seq1GenContFract.IntFractPair · cited by 45GenContFract.IntFractPairStream'.Seq.map · cited by 39Seq.mapGenContFract.IntFractPair.b · cited by 16IntFractPair.bGenContFract.IntFractPair.seq1 · cited by 5IntFractPair.seq1GenContFract.ofCITED BYCITES

Cites10

Mathlib declarations this one mentions in its statement or cites explicitly in its proof. Plumbing is filtered out.

Cited by54

Results whose statement or proof uses this declaration.