case h

⊢ Abs.abs (exp 1 - expNear 0 1 (363916618873 / 133877442384)) ≤ Abs.abs 1 ^ 0 / ↑(Nat.factorial 0) * (1 / 10 ^ 20)
⊢ Abs.abs (exp 1 - 363916618873 / 133877442384) ≤ 1 / 10 ^ 20
apply exp_approx_start
case h

⊢ Abs.abs
      (exp 1 -
        expNear 21 1
          ((((((((((((((((((((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) *
                                                                    7 -
                                                                  1) *
                                                                8 -
                                                              1) *
                                                            9 -
                                                          1) *
                                                        10 -
                                                      1) *
                                                    11 -
                                                  1) *
                                                12 -
                                              1) *
                                            13 -
                                          1) *
                                        14 -
                                      1) *
                                    15 -
                                  1) *
                                16 -
                              1) *
                            17 -
                          1) *
                        18 -
                      1) *
                    19 -
                  1) *
                20 -
              1) *
            21)) ≤
    Abs.abs 1 ^ 21 / ↑(Nat.factorial 21) *
      (1 / 10 ^ 20 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13 * 14 * 15 * 16 * 17 * 18 * 19 * 20 * 21)
case h

⊢ Abs.abs (exp 1 - expNear 0 1 (363916618873 / 133877442384)) ≤ Abs.abs 1 ^ 0 / ↑(Nat.factorial 0) * (1 / 10 ^ 20)
iterate 21 refine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _
case h

⊢ Abs.abs (exp 1 - expNear 21 1 (36295539 / 44271641)) ≤
    Abs.abs 1 ^ 21 / ↑(Nat.factorial 21) * (311834363841 / 610351562500)
case h

⊢ Abs.abs
      (exp 1 -
        expNear 21 1
          ((((((((((((((((((((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) *
                                                                    7 -
                                                                  1) *
                                                                8 -
                                                              1) *
                                                            9 -
                                                          1) *
                                                        10 -
                                                      1) *
                                                    11 -
                                                  1) *
                                                12 -
                                              1) *
                                            13 -
                                          1) *
                                        14 -
                                      1) *
                                    15 -
                                  1) *
                                16 -
                              1) *
                            17 -
                          1) *
                        18 -
                      1) *
                    19 -
                  1) *
                20 -
              1) *
            21)) ≤
    Abs.abs 1 ^ 21 / ↑(Nat.factorial 21) *
      (1 / 10 ^ 20 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13 * 14 * 15 * 16 * 17 * 18 * 19 * 20 * 21)
norm_num1
case h

⊢ Abs.abs (1 - 36295539 / 44271641) ≤ 311834363841 / 610351562500 - Abs.abs 1 / 22 * ((22 + 1) / 22)
case h

⊢ Abs.abs (exp 1 - expNear 21 1 (36295539 / 44271641)) ≤
    Abs.abs 1 ^ 21 / ↑(Nat.factorial 21) * (311834363841 / 610351562500)
refine' exp_approx_end' _ (by norm_num1; rfl) _ (by norm_cast) (by simp) _
no goals
case h

⊢ Abs.abs (1 - 36295539 / 44271641) ≤ 311834363841 / 610351562500 - Abs.abs 1 / 22 * ((22 + 1) / 22)
rw [_root_.abs_one, abs_of_pos] <;> norm_num1
case h

⊢ Abs.abs
      (exp 1 -
        expNear 21 1
          ((((((((((((((((((((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) *
                                                                    7 -
                                                                  1) *
                                                                8 -
                                                              1) *
                                                            9 -
                                                          1) *
                                                        10 -
                                                      1) *
                                                    11 -
                                                  1) *
                                                12 -
                                              1) *
                                            13 -
                                          1) *
                                        14 -
                                      1) *
                                    15 -
                                  1) *
                                16 -
                              1) *
                            17 -
                          1) *
                        18 -
                      1) *
                    19 -
                  1) *
                20 -
              1) *
            21)) ≤
    Abs.abs 1 ^ 21 / ↑(Nat.factorial 21) *
      (1 / 10 ^ 20 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13 * 14 * 15 * 16 * 17 * 18 * 19 * 20 * 21)
case h

⊢ Abs.abs
      (exp 1 -
        expNear 20 1
          (((((((((((((((((((((363916618873 / 133877442384 - 1) * 1 - 1) * 2 - 1) * 3 - 1) * 4 - 1) * 5 - 1) * 6 - 1) *
                                                                7 -
                                                              1) *
                                                            8 -
                                                          1) *
                                                        9 -
                                                      1) *
                                                    10 -
                                                  1) *
                                                11 -
                                              1) *
                                            12 -
                                          1) *
                                        13 -
                                      1) *
                                    14 -
                                  1) *
                                15 -
                              1) *
                            16 -
                          1) *
                        17 -
                      1) *
                    18 -
                  1) *
                19 -
              1) *
            20)) ≤
    Abs.abs 1 ^ 20 / ↑(Nat.factorial 20) *
      (1 / 10 ^ 20 * 1 * 2 * 3 * 4 * 5 * 6 * 7 * 8 * 9 * 10 * 11 * 12 * 13 * 14 * 15 * 16 * 17 * 18 * 19 * 20)
refine' exp_1_approx_succ_eq (by norm_num1; rfl) (by norm_cast) _
⊢ 21 = ?m.5297
⊢ 20 + 1 = ?m.5297
norm_num1
no goals
⊢ 21 = ?m.5297
rfl
no goals
⊢ ↑21 = ?m.5299
norm_cast
⊢ 22 = ?m.5994
⊢ 21 + 1 = ?m.5994
norm_num1
no goals
⊢ 22 = ?m.5994
rfl
no goals
⊢ ↑22 = ?m.5996
norm_cast
no goals
⊢ Abs.abs 1 ≤ 1
simp