        ~ndoc
        [~def-env-var ~ctx-var ~@defparams]
        (let [~@lt-clauses]
-         (list (var ~explicit-def-name) ~@(concat implicit-types
+         (list (var ~explicit-def-name) ~@(concat implicit-types-params
                                                   (map first defparams)))))))
 
 ;;{

    (if-let [res (u/fetch-implicit-type-parameters params)]
      (handle-implicit-type-parameters `deflemma thm-name doc (:rest-params res) body
                                       (:implicit-types res)
                                       (symbol (str thm-name "-lemma"))
                                       (into [] (concat (:explicit-type-params res) (:rest-params res))))
      ;; no implicit type parameters

    (throw (ex-info "Definition kind not supported." {:def-kind def-kind}))))

(defn ^:no-doc handle-implicit-type-parameters
  [def-kind def-name doc params body implicit-types implicit-types-params explicit-def-name explicit-params]
  (println "implicit-types-params=" implicit-types-params)
  (println "implicit-type=" implicit-types)
  (let [[def-kind-name def-kind-kw] (def-kind-infos def-kind)]
    `(do
       (~def-kind ~explicit-def-name ~(str "This is an explicit variant of [[" def-name "]].") ~explicit-params ~body)
       (alter-meta! (var ~explicit-def-name) update-in [:no-doc] (fn [_#] true))
       ~(gen-type-parameters-defimplicit def-name def-kind-name doc explicit-def-name implicit-types implicit-types-params params explicit-params body)
       (alter-meta! (var ~def-name) update-in [:arglists] (fn [_#] (list (quote ~params))))
       [:declared ~def-kind-kw (quote ~explicit-def-name) :implicit (quote ~def-name)])))

