/-- `IntermediateField.extendScalars` is an order isomorphism from
`{ E : IntermediateField K L // F ≤ E }` to `IntermediateField F L`. Its inverse is
`IntermediateField.restrictScalars`. -/
def extendScalars.orderIso : { E : IntermediateField K L // F ≤ E } ≃o IntermediateField F L where
  toFun E := extendScalars E.2
  invFun E := ⟨E.restrictScalars K, fun x hx ↦ E.algebraMap_mem ⟨x, hx⟩⟩
  left_inv E := rfl
  right_inv E := rfl
  map_rel_iff' {E E'} := by
    

Proof state:
K : Type u_1
L : Type u_2
L' : Type u_3
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Field L'
inst✝¹ : Algebra K L
inst✝ : Algebra K L'
S F E✝ E'✝ : IntermediateField K L
h : F ≤ E✝
h' : F ≤ E'✝
x : L
E E' : { E // F ≤ E }
⊢ { toFun := fun E => extendScalars (_ : F ≤ ↑E),
          invFun := fun E =>
            { val := restrictScalars K E,
              property := (_ : ∀ (x : L) (hx : x ∈ F), (algebraMap (↥F) L) { val := x, property := hx } ∈ E) },
          left_inv :=
            (_ :
              ∀ (E : { E // F ≤ E }),
                (fun E =>
                      { val := restrictScalars K E,
                        property :=
                          (_ : ∀ (x : L) (hx : x ∈ F), (algebraMap (↥F) L) { val := x, property := hx } ∈ E) })
                    ((fun E => extendScalars (_ : F ≤ ↑E)) E) =
                  (fun E =>
                      { val := restrictScalars K E,
                        property :=
                          (_ : ∀ (x : L) (hx : x ∈ F), (algebraMap (↥F) L) { val := x, property := hx } ∈ E) })
                    ((fun E => extendScalars (_ : F ≤ ↑E)) E)),
          right_inv :=
            (_ :
              ∀ (E : IntermediateField (↥F) L),
                (fun E => extendScalars (_ : F ≤ ↑E))
                    ((fun E =>
                        { val := restrictScalars K E,
                          property :=
                            (_ : ∀ (x : L) (hx : x ∈ F), (algebraMap (↥F) L) { val := x, property := hx } ∈ E) })
                      E) =
                  (fun E => extendScalars (_ : F ≤ ↑E))
                    ((fun E =>
                        { val := restrictScalars K E,
                          property :=
                            (_ : ∀ (x : L) (hx : x ∈ F), (algebraMap (↥F) L) { val := x, property := hx } ∈ E) })
                      E)) }
        E ≤
      { toFun := fun E => extendScalars (_ : F ≤ ↑E),
          invFun := fun E =>
            { val := restrictScalars K E,
              property := (_ : ∀ (x : L) (hx : x ∈ F), (algebraMap (↥F) L) { val := x, property := hx } ∈ E) },
          left_inv :=
            (_ :
              ∀ (E : { E // F ≤ E }),
                (fun E =>
                      { val := restrictScalars K E,
                        property :=
                          (_ : ∀ (x : L) (hx : x ∈ F), (algebraMap (↥F) L) { val := x, property := hx } ∈ E) })
                    ((fun E => extendScalars (_ : F ≤ ↑E)) E) =
                  (fun E =>
                      { val := restrictScalars K E,
                        property :=
                          (_ : ∀ (x : L) (hx : x ∈ F), (algebraMap (↥F) L) { val := x, property := hx } ∈ E) })
                    ((fun E => extendScalars (_ : F ≤ ↑E)) E)),
          right_inv :=
            (_ :
              ∀ (E : IntermediateField (↥F) L),
                (fun E => extendScalars (_ : F ≤ ↑E))
                    ((fun E =>
                        { val := restrictScalars K E,
                          property :=
                            (_ : ∀ (x : L) (hx : x ∈ F), (algebraMap (↥F) L) { val := x, property := hx } ∈ E) })
                      E) =
                  (fun E => extendScalars (_ : F ≤ ↑E))
                    ((fun E =>
                        { val := restrictScalars K E,
                          property :=
                            (_ : ∀ (x : L) (hx : x ∈ F), (algebraMap (↥F) L) { val := x, property := hx } ∈ E) })
                      E)) }
        E' ↔
    E ≤ E'

Next tactic:
simp only [Equiv.coe_fn_mk]